Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Manipulating Microsoft word using java

 
dimpsonu arora
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a microsoft word template that contains images,header,footer and a table.
Now, I want to create a servlet or any other java/xml program which takes some values from database, open my existing word template and put database values in table of word template. Is it possible if yes then please suggest how. I tried using iText but it could not work properly as my word template is already existing. I just need to fill the values of database into word table.

Thanks in Advance.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, this is not specific jsp / web stuff, so someone might want to move the thread to a more appropriate place...

anyhow, office document manipulation can be done quite comfortable with apache-poi (here). i did some stuff with excel-templates, and from javadoc i know that word is also supported.

hope it helps,
jan
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree, I'm moving this to the Other APIs forum.

Dave
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
POI is an option, although its Word capabilities are not maintained anymore. OpenOffice also handles doc files, and it has a powerful API that you can use. It has a steep learning curve, though.

What were you trying to do with iText? It does not deal with Word documents at all, although it does handle RTF.
 
dimpsonu arora
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ditter,
I know iText deals with .rtf files. But as I was not getting any option, I thought of trying .rtf files. But it did not work as my document is complex one.
Anyhow, Thanks for your suggestions. I wil try to resolve my problem as suggested by you. In case i get any problem i will get back to you. Thanks once again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic