We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

OpenOffice document opening fail

Aspose.Words v6.0.0.0

C# code:

Document doc = new Document("document.odt");

Exception: "The document appears to be corrupted and cannot be loaded."

Stack trace:

at Aspose.Words.Document.?(Exception ?)
at Aspose.Words.Document.?(Stream ?, LoadFormat ?, String ?)
at Aspose.Words.Document..ctor(String fileName, LoadFormat loadFormat, String password)
at Aspose.Words.Document..ctor(String fileName)

Inner exception: "Cannot insert a node of this type at this location."

Stack trace:

at Aspose.Words.CompositeNode.?(Node ?, Node ?, Boolean ?)
at Aspose.Words.CompositeNode.InsertAfter(Node newChild, Node refChild)
at Aspose.Words.CompositeNode.AppendChild(Node newChild)
at ?.?.?(? ?, String ?, CompositeNode ?)
at ?.?.?(? ?, String ?, CompositeNode ?)
at ?.?.?(? ?, CompositeNode ?, Shape ?)
at ?.?.?(? ?, CompositeNode ?, Shape ?)
at ?.?.?(? ?, CompositeNode ?, Paragraph ?)
at ?.?.?(? ?, Paragraph ?, String ໴, ? ?, CompositeNode ?)
at ?.?.?(? ?, String ?, CompositeNode ?)
at ?.?.?(? ?, ? ?, String ?)
at ?.?.?(? ?, ? ?)
at ?.?.?(? ?)
at ?.?.?(? ?)
at ?.?.?(? ?)
at ?.?.?()
at Aspose.Words.Document.?(Stream ?, LoadFormat ?, String ?)

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank for your request. I managed to reproduce the problem on my side and created new issue #6862 in our defect database. I will notify you as soon as it is fixed.

Best regards.

The issues you have found earlier (filed as 6862) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by alexey.noskov.

Aspose.Words v6.0.1.0

Same code. Exception: "Unknown file format.". Document was created by OpenOffice Writer.

Stack trace:

at Aspose.Words.Document.?(Stream ?, LoadFormat ?, String ?)
at Aspose.Words.Document..ctor(String fileName, LoadFormat loadFormat, String password)
at Aspose.Words.Document..ctor(String fileName)

Sample document attached.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your reporting this problem to us. I created new issue #7070 in our defect database. I will notify you as soon as it is fixed.

Note that ODT format is still in beta.

Best regards.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. It seems problem occurs because MIME type of your document is not specified properly. So your document is not a valid ODT file. If you open/save your document using OpenOffice the document can be opened by Aspose.Words.

Maybe you created your document using some third party tool.

Best regards.

Document was created in OpenOffice Writer (v2.0) and OpenOffice Writer (v2.0 and v3.0) opens it without any errors or warnings.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for more information. We will further investigate the problem and provide you more information.

Best regards.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

My colleague tried to create such document using OpenOffice Writer 2.0.3, 1.1.5, 2.0.0 and all works fine. It seems that you perform some processing before opening document by Aspose.Words. Maybe you have unzip file edit some content and zip it again.

Best regards,

I do not remember the exact version of the OpenOffice Writer v2. So the problem is local, thanks for the help.

Could you please check the version of OO Writer? We will try to find the same version and reproduce the problem.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Best regards.

Sorry, but I know only that it was 2.x version. I tried to reproduce this problem with OpenOffice Writer v3.0 and nothing. So I think it’s really local problem for this document created with 2.x version…

Ok. Thank you. We will close corresponding issue.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Best regards.