Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java io

Status
Not open for further replies.

abiram

IS-IT--Management
Dec 2, 2004
1
US
Hi,
How can we create a MS Word doc using java io?
Thankyou
abi
 
The same way you would using file io in any language.

I don't believe this is the answer you are looking for but your question is vague. You might try framing your question between what you already know, and what you don't know.

"But, that's just my opinion... I could be wrong".
-pete
 
You would have to look up microsofts documentation on how they arrange that file format. They would use different binary values to represent different functions and values inside the datafile. I am not even sure microsoft releases this info to the public, but it shouldn't be too hard to reverese engineer. To use java to do this you would use a byte manipulator stream or some other stream modifier, java has alot of them..... again you would have to learn how to dump the proper amount of bytes to the disk and what bytes mean something to the word parser.... you can also write this program in Assembly or c++ but my opinion would be that java is easier and just as fast in this case....

good luck

ackka
ackka@mad.scientist.com
duke_wave.gif
Java is the Future
 
Easier than reverse engineering an MS Word File format would be to reverse engineer an RTF file instead, since RTF almost reverse engineers itself, and it is simple to reproduce. Any PC with MS Word will typically open an .rtf file with Word.

Or isn't there something in the system. package for executing an external program? Rather than recreating the wheel, I would typically prefer to remote control Word itself to create a Word doc.
 
True, i think Visual Basic has been perfectely suited for these needs and would be the best way to do. Plus the compiler is built inside of Microsoft Office, and you can record macros anyway, so you don't even have to really learn the vb language....

later
ackka
ackka@mad.scientist.com
duke_wave.gif
Java is the Future
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top