Excel 2007 xlsx file Generates "Excel Found unreadable content" error

I create a Excel file in Aspose.cells and then open it with Excel. I then enter data in excel and save the file. Then I read all the data from the file and write back some new data with Aspose.Cells. After I have written the data I open the file in excel. When excel opens I am getting this error “Excel found unreadable content in ‘mm02.xlsx’. Would you like to recover the contents from this workbook?”. I have received this error before with an older version of Aspose.cells. Recently I upgraded from 4.7 to 5.1. After the upgrade this error popped up again. I have attached the file that is giving me the error.

Hi Matt,

Thank you for considering Aspose.
We are looking in to this issue. Can you please forward us your sample application and the excel file which you read the data. This will help us finding the issue.

Thanks,

Hi Matt,

We have performed some testing regarding the issue you have mentioned.
We have gone through each and every step mentioned but found no issue. We used VS2008, Aspose.Cells.dll version: 5.1.1.2 for testing. Following code snippet is used:

Workbook workbook = new Workbook();
workbook.ChangePalette(System.Drawing.Color.SkyBlue, 55);
Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells["A1"].Style.Font.Color = Color.White;
worksheet.Cells["A1"].Style.ForegroundColor = Color.Red;
worksheet.Cells["A1"].Style.Pattern = BackgroundType.Solid;
worksheet.Cells["A1"].PutValue("RMMG1-MATNR");

worksheet.Cells["A2"].Style.Font.Color = Color.White;
worksheet.Cells["A2"].Style.ForegroundColor = Color.Black;
worksheet.Cells["A2"].Style.Pattern = BackgroundType.Solid;
worksheet.Cells["A2"].PutValue("Material Number");

worksheet.Cells["A2"].Style.Font.Color = Color.White;
worksheet.Cells["A2"].Style.ForegroundColor = Color.Black;
worksheet.Cells["A2"].Style.Pattern = BackgroundType.Solid;
worksheet.Cells["A2"].PutValue("demo test 01");
workbook.Save("C:\\ExcelTest.xlsx", SaveFormat.Xlsx);

/////////////////////////////////////////////////////////////////////////////////////////////////
Workbook workbook = new Workbook(@"C:\ExcelTest.xlsx");
Worksheet mySheet = workbook.Worksheets[0];
mySheet.Cells["A7"].Value = "Test Data";
mySheet.Cells["A8"].Value = "Aspose";
workbook.Save("C:\\ExcelTest_new.xlsx", SaveFormat.Xlsx);

I am attaching the Xlsx files.

It is requested that you must provide your sample project & sample Xlsx file to perform test. So that issue can be reproduced.

Thanks,

I cant post my exact code, but I put together a sample that shows the error. Essentially I found that the

Worksheets.CustomDocumentProperties.Contains(string) function is not working properly. It allows me to insert custom document properties. Then if I attempt to insert the same properties again but check the value with the Contains function it comes back as false. But if you put Worksheets.CustomDocumentProperties[key] it comes back with a value the second time.

Thanks for providing us the template files.

After testing, We are able to find the issue you have mentioned. Your issue has been logged into our issue tracking system with an id: CELLSNET-19250. We update you as soon as it is fixed.

Thanks,

Hi Matt,

The issue regarding Worksheets.CustomDocumentProperties.Contains(string) function has been fixed. Please try the attached Aspose.Cells.dll version 5.1.2.1.

Thanks,

Thank you for the quick turn around with the fix. I can confirm it is working.

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


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

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


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