Using the latest Aspose.Cells for .NET 17.10, it results in the pivot table portion of the file becoming corrupted and Excel prompting with a message to recover content when attempting to open.
Attached is a template that demonstrates the issue.
example.zip (12.2 KB)
The example xlsx file can be opened fine in Excel. It contains a pivot table one the first worksheet that is generated using data from a named range on the second worksheet. After calling the RefreshPivotTables routine on the worksheet containing the pivot table, and then saving, the resulting file will then be corrupted.
Here is the sample code that demonstrates the problem:
Dim workBook As New Aspose.Cells.Workbook("c:\temp\example.xlsx") Dim pivot As Aspose.Cells.Pivot.PivotTable = workBook.Worksheets(0).PivotTables(0) workBook.Worksheets(0).RefreshPivotTables() workBook.Save("c:\temp\result.xlsx")
When opening the result file Excel will prompt with an error message stating that there is a problem with some content. By telling it to proceed it will indicate that it is the pivot table causing the issue. The repaired file is then missing some necessary content that the original contained.