I do the following to update/calculate/refresh all pivot tables in the file before saving the file:
For Each _sheet As GemBox.Spreadsheet.ExcelWorksheet In gemboxFile.Worksheets
For Each _table As GemBox.Spreadsheet.PivotTables.PivotTable In _sheet.PivotTables
_table.PivotCache.Refresh()
_table.Calculate()
NextNext
gemboxFile.Save(strOutputfile)
If I now open the file in MS-Excel I warning: “We found a problem with some content…”
If I then click “Yes” to open the file I get:
Repairs to “filename.xlsx”:
Repaired Records: PivotTable report from /xl/pivotCache/pivotCacheDefinition1.xml part (PivotTable cache)
Am I doing something wrong?
I’m using 47.0.1386-hotfix