Web Development

Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!

General discussion


printing excel sheet using html

By eonmaximus ·
how do i open and print an excel sheet using html. i would like to creat a print button that when u click on it, will go to the excel sheet and open up a print dialogue box. once the print button is click from the print dialogue box, it will print that excel sheet. i greatly appreciate your help. hope to get your response as soon as possible. thanks

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

printing excel sheet using html

by HeartyGuffaw In reply to printing excel sheet usin ...

I don't know what version of Excel or what web browser you're using. This isn't EXACTLY what you're looking for, but you could:

1.) Create a macro in your excel spreadsheet to perform the print function. Use Tools-Macro-Record and then record the "File-Print" actions. Stop the macro and save it. Create a Command Button at the top of the spreadsheet, name it "Print" and link it to the macro you just created.

2.) Publish the actual spreadsheet in the same location as your web page. Linkthe spreadsheet from your web page :
<a href="myspreadsheet.xls">Spreadsheet</a>

Assuming your users have the same or newer versions of Excel that you have, this will open Excel by clicking on the link. They can click the Print button on your spreadsheet to print it automatically.

You could make the macro a little better by doing the print and then closing Excel after printing.

I know this works with Internet Explorer. I do not know if it will work with other web browsers.

Good Luck.

Related Discussions

Related Forums