This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Read a word document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Read a word document" Watch "Read a word document" New topic
Author

Read a word document

Ram Kas
Ranch Hand

Joined: Jul 26, 2006
Posts: 83
Hi,

I want t o read a word document and print the contents to console. But, when I do it as if I were doing it with text files, it displays some weird characters. Can anyone throw some light on how I should proceed?

Thanks in advance.

Dinakar Kasturi.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
DOC is a binary file format; you can't treat it like you would treat text files. An API that can extract the text from a DOC file is Jakarta POI; you can find some usage examples here.


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: Read a word document
 
Similar Threads
need help to work with apache poi.hwpf
Reading word document
How to read MSWORD and MSEXCEL document
question on FileInputStream
Mearging two word documents using POI