Refresh and Calculate Pivot Table having Calculated Items with Golang via C++
Contents
[
Hide
]
Aspose.Cells now supports refreshing and calculating a pivot table having calculated items. Please use the PivotTable.RefreshData() and PivotTable.CalculateData() as usual to perform this function.
Refresh and Calculate Pivot Table having Calculated Items
The following sample code loads the source Excel file which contains a pivot table having three calculated items such as “add”, “div”, and “div2”. First, we change the value of cell D2 to 20, then refresh and calculate the pivot table using Aspose.Cells APIs, and then save the workbook in PDF format. The results in the output PDF show that Aspose.Cells refreshed and calculated the pivot table having calculated items successfully. You can verify this using Microsoft Excel by manually putting the value 20 in cell D2 and then refreshing the pivot table via the Alt+F5 shortcut key or by clicking the Refresh button on the pivot table.