Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Apr 11, 2019 7:18 am

Hi Spire,

I am using Spire.Doc 6.12.9.4045 and I am encountering an issue converting the attached document. I got an error "This is not a structured storage file" right after this line.

document.LoadFromStream(file.InputStream, Spire.Doc.FileFormat.Doc);

Thanks,
Kevin

nkeung
 
Posts: 19
Joined: Fri Sep 07, 2018 8:36 am

Thu Apr 11, 2019 8:32 am

Hello,

Thank you for contacting.
After parsing your document, I found the format of it is docx but not doc, thus you encountered the error after specifying the FileFormat.Doc. When using LoadFromStream method, I suggest you use FileFormat.Auto to get rid of this issue. If there is any question, welcome to write back.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.Doc