cancel
Showing results for 
Search instead for 
Did you mean: 

MS Word APIs for JAVA

gautam_parida
Explorer
0 Kudos

Hello All,

Is there a way by which i can call APIs from Java programs to generate and manipulate documents in MS Word.

We need to generate reports , replace bookmarks/placeholders with values from database, create versions and merge versions etc.

Are there any APIs available to do this directly from JAVA . We would not like to use any 3rd party programs to do this.

best regards,

gautam

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Gautam,

there is a apache-project, but I don't know if it already has published any releases. Take a look at:

http://jakarta.apache.org/poi/index.html

thomas

Former Member
0 Kudos

You could use a Java-Com bridge to access MS-Word. Check out e.g. http://j-integra.intrinsyc.com/.

Cheers,

Heiko

detlev_beutner
Active Contributor
0 Kudos

Hi Gautam,

for an overview see http://www.geocities.com/marcoschmidt.geo/java-libraries-word.html

You'll see that this is supported very, very rarely. The POI sub-project is - by it's aims - closest to your needs, but only the excel-part has reached something like robustness.

An additional possibility is to use the Java API of OpenOffice. On the one this needs OpenOffice installed (disadvantage), on the other hand it's definitely the best support for Word format existing as Java API (advantage). Anyhow, a disadvantage is that it's all but intuitive...

Hope it helps

Detlev

PS: Please consider rewarding points. Thanks in advance!

Former Member
0 Kudos

You can do it all in XML.

MS Word 2003 can load from XML, and save to XML. The documents can contain rich formatting, images, fonts, styles, all the Word stuff you are accustomed to.

A working example is here:

http://blogs.msdn.com/dotnetinterop/archive/2005/03/29/403331.aspx