This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Reading a Word document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Reading a Word document" Watch "Reading a Word document" New topic

Reading a Word document

Geeta Ramasami
Ranch Hand

Joined: Mar 05, 2003
Posts: 72
I would be opening a word document from my java application and want to edit that document thru my java application.And when i save the file it should be stored as a word doc.Bcos i save the file simply with .doc extn the format won't be proper.So is there any component available for the same..
Greg Charles

Joined: Oct 01, 2001
Posts: 2963

Not that I've heard of. I saw a Java component set that would do most of what Excel could, and presumably save spreadsheets in an Excel compatible form. I've never seen the same for Word though. The problem is that Microsoft changes the "doc" format fairly frequently. The cynical among us might claim they do this in order to protect their monopoly on Word. Other companies make word processors that understand the doc format, only to have it changed on them a few months later. A Java component would face the same problem. The annoying thing is, people send me Word docs all the time, and unless my version of Word is as up-to-date as theirs, I can't read it.
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
You might want to check out Jakarta's POI project. I don't know if it has enough functionality for you (I've never used it), but the HDF format is intended to read/write .doc files.

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: Reading a Word document
jQuery in Action, 3rd edition