GeeCON Prague 2014*
The moose likes Java in General and the fly likes Direct Access to Word document from Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Direct Access to Word document from Java" Watch "Direct Access to Word document from Java" New topic
Author

Direct Access to Word document from Java

Paul Reedman
Greenhorn

Joined: Mar 02, 2004
Posts: 3
Hi,

I have a problem - I need to update data in a table which exists in a MS Word document. (from Java)

I know about the Apache POI project, however it says that the MS Word interface is very immature.

I am wondering if anyone else has tried this and if so what API or tool did they use.

Thanks

Paul Reedman
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
Can you get the Word Document in RTF format? That is supposed to be easier to interpret.
Bill
Paul Reedman
Greenhorn

Joined: Mar 02, 2004
Posts: 3
Yes that might be possible.

Anyone know if (or where) the RTF format is documented..?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
This Wikipedia entry is a good starting place.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42045
    
  64
I've got one word for ya: Wotsit

You might use one of the Java parser generators for which an RTF grammar exists instead of rolling your own. Check out JavaCC, SableCC and Antlr.


Ping & DNS - my free Android networking tools app
Pradeep Kadambar
Ranch Hand

Joined: Oct 18, 2004
Posts: 148
Look for the Jacob Project in sourceforge. This will allow bridging between java and COM objects.

It can be used to create, modify and save word, RTF documents.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Direct Access to Word document from Java