Save as XLSX sometimes produces invalid file

Hello,
I’m using Aspose.Cells v7.0.3.0 to load xls files and manipulate them, and save the results in various formats, including xlsx format. I have a problem where some of the xlsx files created cannot be opened in Excel 2007. Excel reports an error like “Excel found unreadable content in ‘file.xlsx’.“

I can’t find any differences in the xls files that work (convert to readable xlsx) and the ones that don’t (convert to unreadable xlsx). In fact, I have stripped everything out of two files (good.xls and bad.xls, attached) and still one works and one doesn’t. Can you provide any insight on what could be causing the bad.xls file to be converted to an unreadable xlsx? Is there anything I can do in my code to ensure that the xlsx file will be okay?

Here is the code I am testing with:
var file = string.Format(@”{0}\Good.”, TestHelper.InputDirectory);
var workbook = new Workbook(file + “xls”); //existing file
workbook.Save(file + “xlsx”, SaveFormat.Xlsx);

Hi,

Thanks for your posting and providing us the files.

We have logged this issue in our database for development team to look into it. Once we get some fix or update, we will let you know asap.

This issue has been logged as CELLSNET-40336.

Hi,

Please download and try this fix:
Aspose.Cells
for .NET v7.1.0.4

Thanks, this update does seem to fix the problem for this particular example. Can you tell me the circumstances which caused the problem? I.e., in cases where the older version is deployed, is there something that we could avoid in our spreadsheets that would get around the problem?

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.