Hi James,
Hi Kashif,
SpreadsheetGear is the third party library.
It throws, "Corrupt OpenXML document." as error message.
We greatly appreciate your co-operation in this.
Cheers, Bhavin
Thanks James for sharing the information.
Hi Kashif,
Here is the exception message and stack trace while opening file using SpreadsheetGear:
Msg [Corrupt OpenXML document.] Stack trace below:
at ?.?()
at ?.?(? A_0)
at ?.?.?()
at ?.?(? A_0)
at ?.?(? A_0, Int32 A_1)
at ?.?.?(? A_0, Int32 A_1)
at ?.?.?.?.?()
at ?.?(? A_0)
at ?.?(String A_0, ? A_1)
at ?.?(? A_0)
at ?.?.?.?(? A_0, ? A_1)
at ?.?.?.?.?.?()
at ?.?(? A_0)
at ?.?.?.?.?(? A_0, ? A_1, ? A_2)
at ?.?(? A_0)
at ?.?(String A_0, ? A_1)
at ?.?(String A_0, String A_1, ? A_2)
at ?.?.?()
at ?.?(? A_0)
at ?.?(? A_0)
at ?.?.?()
at ?.?(? A_0)
at ?.?(String A_0, ? A_1)
at ?.?(String A_0, String A_1, ? A_2)
at ?.?(? A_0)
at ?..ctor(? A_0, String A_1, Boolean A_2, ? A_3, ? A_4, ? A_5, ? A_6, Stream A_7, Boolean A_8)
at ?.?(? A_0, String A_1, Boolean A_2)
at ?.?.?(? A_0, String A_1, Boolean A_2)
at ?.?.?(String A_0, Boolean A_1, Stream A_2)
at ?.?.Open(String filename)
Hope this helps, you diagnosing the issue.
Cheers, Bhavin
Thank you Bhavin for the information. This will indeed help us in the diagnosis.
Hi Kashif,
The attached file was originally created by MS-Excel.
Then it was modified by SpreadsheetGear twice and saved twice.
Cheers,
Bhavin
Thank you Bhavin for the information.
Hi,
You need to set OoxmlSaveOptions.ExportCellName property.
Please see the following code.
C#
Workbook workbook = new Workbook();
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
saveOptions.ExportCellName = true;
workbook.Save(@“D:\FileTemp\dest.xlsx”,saveOptions);
Hi Shakeel,
I have tried the suggestion you mentioned; Setting OoxmlSaveOptions.ExportCellName property to true.
But, SpreadsheetGear still throws exception while opening file "Corrupt open xml document".
I really appreciate the help and support here.
Thanks heaps,
Bhavin.
Hi,
Thank you.
Could you please download and try the latest version:
Aspose.Cells
for .NET v7.2.0.8
with the same code as shown below and let me know your findings.
Please also post screenshots showing error in a SpreadsheetGear, it will help us sort out this issue quickly.
C#
Workbook workbook = new Workbook();
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
saveOptions.ExportCellName = true;
workbook.Save(@“D:\FileTemp\dest.xlsx”,saveOptions);
Hi Shakeel,
Thank you for the reply,
Unfortuneatly, the latest DLL version 7.2.0.8 does not resolve the issue.
Please find attached screenshot of the exception/error detail in SpreadsheetGear.
Cheers, Bhavin
Hi,
Hi,
If a namespace is re-defined in the child node (<a:solidFill
xmlns:a=http://schemas.openxmlformats.org/drawingml/2006/main">),
SpreadGear could not parse the file. Maybe it’s the bug of
SpreadGear.
Anyways we will remove the duplicate defined namespace if it’s
not needed.
Hi Shakeel,
Unfortuneatly, SpreadsheetGear still fails with the same error/exception from my previous post.
Is there anything other than duplicate namespace removal required from the open xml format??
Please investigate further,
Regards,
Bhavin
Hi,
Hi,
Please find attached workbook, that is latest file.
Regards,
Bhavin
Hi,
Hi,
The issues you have found earlier (filed as CELLSNET-40669) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.