Aspose may have incorrect implementation/interpretation to open incorrect file format

Hi There,

Recently, we encountered an issue with a file; being unable to open by third party library (other than ASPOSE). Whereas the ASPOSE library was able to open the file without any issue.

We may believe that the file may contain incorrect Excel Format, and ASPOSE ignores the "erroneous" Format and opens it without any issue.

Would you be able to confirm that the attached Excel file, conforms to Standard Excel Specification OR not?

Thanks in advance,

Bhavin

Hi James,


I downloaded and used your provided Excel file with Aspose.Cells V 7.2.0.6, and found that the workbook was loaded without any problem. For further investigation, I manually checked the debug data for the objects/shapes contained in the workbook, and could not find any problem with these as well. Also, MS-Excel is able to open it without any problems.

Can you please tell us about the error message given by the other third party library, so that we can have a better idea of the problem’s nature. Also, if you could tell us which other library you are using, it may be helpful for us.

Thanks

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.


Can you please provide us some screenshot of this error? This will help our development team in generating/finding the issue more accurately. I appreciate your cooperation in this regard.

Thanks and Best Regards

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.


I would like to have one more piece of information. Have you generated the attached excel file using Aspose.Cells or MS-Excel?

Thanks & Best Regards,

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.


I have logged the issue in our system as CELLSNET-40669 and forwarded all the information to our developers. Once we get any update on the issue, we will notify you via this thread.

Thanks for your cooperation and continuous feedback

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,


Thanks for providing the screenshot of the exception. I have logged your comments into our database and our development team will look into it.

Thanks & Regards,

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,

We have fixed this issue.

Please download and try the latest fix: Aspose.Cells for .NET v7.2.1.1

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,


Thanks for your feedback.

Could you please provide us with your latest output excel file that is still posing the problem? This will help us investigate the issue furhter.

Hi,

Please find attached workbook, that is latest file.

Regards,

Bhavin

Hi,


Thank you for providing us with the supported excel file. Our development team will look into it and we will let you know here once we get an update.

Hi,


Please download and try this latest fix Aspose.Cells for .Net 7.2.1.4, and let us know your feedback.