wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 2841

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
Consider Paul's rocket mass heater.
subject: Reading a Word document
Similar Threads
XSL Transformation into Word 2003 XML format handling logic to load XML data
convert word file to html
saving a html file as word document on click of a button
Design document
Cannot compile java applications