Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Print MS Excel Spreadsheet to Printer

 
Joyce Kind
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic