Excel files that are processed using Aspose.Cells (versions 19.8 and 22.6) seem to be corrupted.
We have created a test application that only opens and saves the file to the new location using Aspose.Cells.
Original files can be opened without any issue.
Newly saved files exhibit strange behavior while opening.
The data sources for the test files must be extracted to C:\Test folder, PowerQuery doesn’t support relative links. Here is the folder that needs to be extracted under C:\Test.
Unzip the TestProject.zip to any location.
Start the application, \TestProject.zip\TestProject\bin\Debug\AsposeCellsTest.exe, select any of the test files located in \TestProject.zip\TestProject\TestFile folder.
The newly saved file will be saved in the same folder as the selected file under a different name: 01_originalfilename.
\TestProject.zip\TestProject\TestFile folder has files without Pivot table.
Those files were created by deleting the worksheet “Summary Dashboard“ from the original customer file.
This worksheet has a Pivot table for datasource.
After deleting it, the file can be opened normally using Excel.
If You try to open and save it using Aspose.Cells, using the test application, Aspose.Cells will through exception: “Object reference not set to an instance of an object“.
Observe the different behavior when opening original and newly saved files using Excel.
If the newly saved file is resaved in the Excel application, everything works normally.
Explained behavior suggests that this is an Aspose.Cells issue, saving the Excel file with the complex Data Model like Pivot table.
We use Aspose.Cells specifically for password-protected Excel files.