Solved

How to read MS Word docs?

Posted on 2008-06-11
4
230 Views
Last Modified: 2013-11-23
Is there any native support, that I've missed, in the Java API's to parse the text of a word document using Java?
0
Comment
Question by:jsonburke
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
mbodewes earned 400 total points
ID: 21765171
A word document is a very, very complicated thing indeed. See the various efforts of Microsoft to get the thing close to standardization of late.

But your best bet is http://poi.apache.org/, which has limited support for the word 97 format. I haven't used it myself though. Full support is probably impossible, even Word does not handle Word format all that well.
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 100 total points
ID: 21767187
Word is a closed-source, proprietary format that is in a constant stage of revision and that target is deliberately kept moving as fast as possible to make reverse engineering as difficult as possible.
Nonetheless, the StarOffice/OpenOffice people have managed and continue to manage it. Word will converge on some form of XML format in the near future, which will make reverse engineering it a lot easier.
You'd therefore be better off using OpenOffice's UNO API to manipulate Word files in Java

http://udk.openoffice.org/java/man/index.html
0
 

Author Closing Comment

by:jsonburke
ID: 31466498
Thanks for the information gentlemen. I was able to successfully manage a solution using the Apache API late last night. I'll have a look at the Uno API when I have a chance as well.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 21768141
:-) With any luck you won't need the Apache API soon ;-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 70
recent docs in word and excel 3 38
rhino JavaScript import, load 25 67
How to convert String matching to regex in java 4 19
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now