• Post Reply Bookmark Topic Watch Topic
  • New Topic

converting excel and pdf files to java objects

 
kiran manohar
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have a requirement where i need to convert excel and pdf files to java objects just like converting xml files to java objects using xml parsing methods.is this possible. if so plz give the code or atleast the api
Thanks
Kiranmanohar
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kiran:
take a look at iText for java-PDF conversions.
For Excel, if you are on Windows, probably the best way is to create an ODBC driver to the Excel file (yes, you can do that...) and read the document through the JDBC-ODBC bridge. if you cannot do that, then look at the Jarkata POI API.
 
kiran manohar
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi joel,
thanks for the links. but the pdf to java is based on servlets. cant i use java api instead of servlets in iText.
Regards
Kiranmanohar
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kiran,
iText ccan be used withoud servlets as well, u should go through their docs/tutorial. Here is a link for sample program http://www.lowagie.com/iText/examples/Chap0101.java
 
kiran manohar
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dwivedi,
thanks for the suggestions.its working great. i have another doubt , is it possible to convert java objects to pdf and pdf to java objects or am i asking too much .
regards
kiranmanohar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!