File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 12675
    
    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: 12675
    
    5
This Wikipedia entry is a good starting place.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39542
    
  27
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 - updated with new look and Ping home screen widget
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Direct Access to Word document from Java
 
Similar Threads
MS-word document file to XML in Java
Java Api for MS Word Table Handling
Java API on MS-Word
empty lines in a document.
Coverting RTF to DOC