General discussion

  • Creator
    Topic
  • #2344830

    printing excel sheet using html

    Locked

    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

All Comments

  • Author
    Replies
    • #3707696

      printing excel sheet using html

      by jay eckles ·

      In reply to printing excel sheet using html

      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
      http://www.jayeckles.com

Viewing 0 reply threads