Automate Microsoft Word in a Java application

Hi there,I want to write formatted text from my Java application, including data store in the database. How can I do it? Do you recommend me POI or JACOB? What are the advantages of each of those?Thanks a lot for your help.
[244 byte] By [victormeba] at [2007-10-2 20:22:38]
# 1

We have been using Jawin, http://jawinproject.sourceforge.net/, which would be similar to JACOB in that it is a Java-COM JNI bridge. I'm not sure which of the two is better at this point. (Do we really need 2 of these?) A Java-Com bridge is a good choice if you want complete control over a Word document. Word must be installed on the target machine. We use Jawin to open Word templates, set several bookmarks, run macros and set some properties.

We have used POI with Excel and found it to perform much faster for most operations than similar ops through JNI using Jawin. I have not used POI for manipulating Word files.

Of course, of the three projects POI seems to have the most active support / development.

pthorsona at 2007-7-13 23:05:18 > top of Java-index,Java Essentials,New To Java...
# 2

C# or J# might be a better choice?

How about outputting a more cross platform format, Adobe Acrobat maybe?

JACOB is a com bridge, so I'd guess it would need to be on a Windows box, with Word installed.

* Will do everything native Word APIs do (one would guess)

* Will require you to think in COM

* Goes through an extra API

POI is a pure java Office API.

* Java-like APIs (at guess)

* cross platform.

So, it depends on your requirements.

mlka at 2007-7-13 23:05:18 > top of Java-index,Java Essentials,New To Java...