This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Print MS Excel Spreadsheet to Printer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Print MS Excel Spreadsheet to Printer" Watch "Print MS Excel Spreadsheet to Printer" New topic
Author

Print MS Excel Spreadsheet to Printer

Joyce Kind
Greenhorn

Joined: Nov 27, 2008
Posts: 8
Hi all,

I am having a problem to print an Microsoft Excel spreadsheet to printer using Java. I searched POI, Jxcell ect. and could not find the solution. The Jave Print Service API seems no support too. Sorry if I am wrong.

Could anybody, who printed the spreadsheet to printer using Java before, please tell me which API you have used? I would like to study for it.

Thanks in advance,
Joyce
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41060
    
  43
Welcome to JavaRanch.

You're right that none of the Excel APIs support printing, and I don't think any printer supports printing XLS files directly, so the Java printing APIs won't be of much help out of the box.

The two possible ways I see are either to use OpenOffice (by way of its Java API), or to implement printing yourself. For the latter you'd use POI or jExcelAPI to read the file, and then implement the Printable interface to do the actual imaging. The former is probably easier, but still has a fair learning curve.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Print MS Excel Spreadsheet to Printer
 
Similar Threads
Reading date from Excel Spreadsheet
How to print different type of document types in java ?
Printing API Question
difference between two dates with excel as database
Printing in Unix