This project is read-only.

Error while reading .doc file

Jul 26, 2013 at 7:09 PM

I got this file when i'm trying to read .doc (97-2003) file.

An unhandled exception of type 'ICSharpCode.SharpZipLib.Zip.ZipException' occurred in ICSharpCode.SharpZipLib.dll

Additional information: Wrong Local header signature: 0xE011CFD0

This is my code:

FileStream fs = new FileStream("test.doc", FileMode.Open, FileAccess.Read);
XWPFDocument document = new XWPFDocument(fs);
XWPFWordExtractor exctr = new XWPFWordExtractor(document);

And this is my doc file:
Oct 10, 2013 at 5:24 AM
XWPF is for docx instead of doc. To read doc, you have to use code in ScratchPad. The namespace is called HWPF. But HWPF is not included in official release because it's not stable yet.