Copy file using Aspose Cells requires repair

I have found an issue with how the Aspose Cells opens and re-saves a workbook. This is not a priority right now for me because I have fixed my source file. However, something is not processing correctly.

'USING ASPOSE CELLS 7.2.1.0
Dim WORKBOOK As New Aspose.Cells.Workbook("C:\TESTFOLDER\SOURCE.xlsx")
WORKBOOK.Save("C:\TESTFOLDER\COPY.xlsx")

The attachment has two source files and their associated copies using the latest Aspose DLLs. The original worksheet has been added to / removed from over the course of a couple of years. I boiled down the problem source to a comment in a cell. When opening the "Copy using AsposeCells BAD.xlsx" file, Excel complains "Excel found unreadable content in 'Copy using AsposeCells BAD.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes." Clicking yes returns the result of the processing "Excel was able to open the file by repairing or removing the unreadable content. Removed part: Print options". Saving the file as an XML Spreadsheet also fixes this issue.

Although my source file is working now that I'm using the Aspose Cells copy that Excel repaired, I would like to ensure any future file doesn't get broken in this manner.

FYI: I renamed the “Source BAD.xlsx” file to “Source BAD.zip”, opened the zip archive and deleted the subfolder “xl\printerSettings”, and renamed the file back to .xlsx. When I tried to open the edited file, Excel generated the same error and recovered the file. This recovered file was able to be copied correctly using Aspose Cells.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

I was able to replicate the problem using the Source Bad.xlsx file, Source Good.xlsx file worked fine using the latest version:
Aspose.Cells
for .NET v7.2.1.7


We have logged this issue in our database. We will look into this issue and once the issue is resolved or we have some other update for you, we will let you know asap.

Below is my sample test code. I have attached the output xlsx files. Also, I have attached the screenshot showing error in Ms-Excel 2010.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\Source BAD.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.Save(filePath + “.out.xlsx”);


Screenshot:

Hi,

We have fixed this issue.

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

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