Web Development

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 Jay Eckles In reply to printing excel sheet usin ...

The only thing I can think of is to open a new window, saving the handle to that window in a variable. The URL of that window should be the excel sheet. Immediately after the window is opened, you call print() on that window with the handle you saved. Here's a little Javascript to get you started.

excelwindow = window.open( "http://server/book.xls", ... ) ;
excelwindow.print() ;

I don't know if this will work; I haven't tested it, but it's about the only option you have. The other thing I might try is opening the spreadsheet in a frame and calling window.print() from the frame that does not contain the spreadsheet. That should print the entire webpage including the spreadsheet.

Good luck.

Jay Eckles

Related Discussions

Related Forums