954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to Open a word doc from a java application?

I need to open a word doc template from a java application
and i also need to dynamically update the fields
in the template with some values from the java application..
Can anybody help me????......

Thanks in advance..........

tigerxx
Light Poster
35 posts since Sep 2004
Reputation Points: 10
Solved Threads: 0
 

Opening the document is the easy part, it's just a file after all ;)

Interpreting it is hard. There's a library by the Apache group (Jakarta project) which offers partial capabilities to read and write Word documents http://jakarta.apache.org/poi/index.html but if that is not enough you're pretty much on your own (I think they'd be happy to accept contributions towards completing their work).

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

hmmm. I think when you name your fields you want to fill like this "<[(myfield1)]>" etc you have a great chance to fill your document without any word interpreter. Only stupid string-replacement. Try it.

Its interessting wether it works for me, too.

Let me know.

Greetings from Germany

Ben

mr_bemar
Newbie Poster
4 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

hmmm. I think when you name your fields you want to fill like this "<[(myfield1)]>" etc you have a great chance to fill your document without any word interpreter. Only stupid string-replacement. Try it.

Its interessting wether it works for me, too.

Let me know.

Greetings from Germany

Ben

no u misunderstood i wann to create some template and fill
them with correct data ..............

tigerxx
Light Poster
35 posts since Sep 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You