This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Reading Word Doc 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 Word Doc" Watch "Reading Word Doc" New topic
Author

Reading Word Doc

raj baig
Ranch Hand

Joined: Jul 11, 2006
Posts: 96
hi,
I am trying to read a word file using poifs. But i am unable to get the out put.
There is no error . but i am not getting the data.




But the byte array length is showing 113 ( as the size of doc)
and the Strring length is showing 113.
But when i print string it is not showing the daata.

Regards,
Raj.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41170
    
  45
The characters could (at least partly) be unprintable characters. If you're using DoumentInputStream to get ta byte[], then there is not much point in using POI, is there? You could just as well use the java.io package. The way to extract text from a DOC file using POI is documented here.


Ping & DNS - my free Android networking tools app
raj baig
Ranch Hand

Joined: Jul 11, 2006
Posts: 96
hi,
i am trying to get the data from word file using HWPFDocument
I searched in google for the jar file.But not.

can you provide me the link to download the jar:

org.apache.poi.hwpf.HWPFDocument class.
raj baig
Ranch Hand

Joined: Jul 11, 2006
Posts: 96
Is no one work with msword files

If any one please provide me the link for the jar file.
or
tell me any other way of reading msword files.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8843
    
    7

According to the HWPF Overview:

HWPF is still in early development. It is in the scratchpad section of the SVN. You will need to ensure you either have a recent SVN checkout, or a recent SVN nightly build (including the scratchpad jar!)

so there is no JAR to download. You have to get the source and build it.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading Word Doc
 
Similar Threads
Thread Flow
Index of the last character of Strings
java.io.FileNotFoundException
TIFF. DOC, EXCEL to PDF Converter
Character conversion error: "Malformed UTF-8 char -- is an XML encoding declaration m