On Mon, 12 Feb 2007, ahnf wrote:
> Using WordDocument.writeAllText()
Try using org.apache.poi.hwpf.extractor.WordExtractor from the latest
alpha - people tend to have the best luck with that.
http://jakarta.apache.org/poi/hwpf/quick-guide.html
> java.io.IOException: Invalid header signature; read 7015536635646467195,
> expected -2226271756974174256
> at
> org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:91)
> at
> org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:83)
> at org.apache.poi.hdf.extractor.WordDocument.<init>(WordDocument.java:189)
The document isn't an OLE2 document, so poi can't read it. Try with hwpf,
it tends to give more helpful error messages from invalid files (eg
IllegalArgumentException("The document is really a RTF file") )
As for the others, see if you get a different error with hwpf. You might
have more luck (I usually do)
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/