Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
When you create a Pivot Table, Microsoft Excel takes a copy of the source data and stores it in the Pivot Cache. The Pivot Cache is held in memory by Microsoft Excel. You cannot see it, but that data is what the Pivot Table references when you build the Pivot Table, change a slicer selection, or move rows/columns around. This enables Microsoft Excel to be very responsive to changes in the Pivot Table, but it can also double the size of your file. After all, the Pivot Cache is just a duplicate of your source data, so it makes sense that your file size could potentially double.
When you load your Excel file into the Workbook object, you can decide whether you also want to load the records of the Pivot Cache, using the LoadOptions.setParsingPivotCachedRecords property. The default value of this property is false. If the Pivot Cache is large, loading it can affect performance. However, if you need to load the records of the Pivot Cache, you should set this property to true.
The following sample code demonstrates the usage of LoadOptions.setParsingPivotCachedRecords property. It loads the sample Excel file while parsing the pivot cached records, then refreshes the pivot table and saves it as the output Excel file.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.