Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can convert excel to pdf .

 
wang hong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using java, i can open a excel file, i want to change excel file into pdf. how can i do with it.
 
john guthrie
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't know excel-to-pdf, but looking at this as a java-to-pdf issue, here are some potentials...
iText is a java pdf library:
http://www.lowagie.com/iText/
also, if you want to get into the xml world, you can go excel-to-xml-to-pdf. the xml-to-pdf part would be handled using xslt and xsl-fo (see http://xml.apache.org/fop/ for an example).
lastly, jfreereport does pdf generation:
http://www.object-refinery.com/jfreereport/
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just curious ... how did you wind up opening the Excel file?
 
Garandi Garandi
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://jakarta.apache.org/poi/hssf/index.html
I used the above to go from java to excel and from excel to java.
Thank you
Garandi
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic