1
using (FileStream readStream = File.OpenRead(filePath)){
    bool test = readStream.CanRead;
    document = new XWPFDocument(readStream);

I want to read many docx by NPOI , but when i read some docx ,show "SettingsDocument parse failed"

and get Exception

System.ObjectDisposedException

and Message show can`t access the file has cloesd;

enter image description here

i want to read many docx by NPOI , but when i read some docx ,show "SettingsDocument parse failed"

new XWPFDocument(readStream) throw exception ,detail like this enter image description here enter image description here

1
  • Can you show which call throws the exception? The new XWPFDocument(readStream)? Can you also tell us the kind of file you are trying to open: a .doc or a .docx
    – Ergis
    Feb 17 at 10:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.