Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to generate WORD document ? HELP !  RSS feed

 
Sylvia Wang
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody can give any idea on how to dynamic generate a Word .doc file on Web server base on the template file from Servlet/JSP ?
the fields value has to be filled by the dynamic data.
I've searched on other Java forum, see the similar question but no answers. I'm quite afraid that there's no easy way for this.
Thanks a lot !
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might have better luck creating a RTF format file that Word can read since the format is better known.
If I really had to plug values into a Word document I would create a prototype document with XXXX and YYYY etc everywhere that the values had to go, grab the whole thing into a byte array and locate the substitution points. A pretty gross hack but it might work.
Bill
 
Sylvia Wang
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank, William.
Sounds it's a way out, I may test that out.
Beside, anybody has more lazy ways ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!