How to: Refresh a Pivot Table
To refresh a pivot table and retrieve the latest data from a data source, use the PivotCache.Refresh method of the PivotTable cache accessible through the PivotTable.Cache property. All pivot tables that are based on the same PivotCache will also be refreshed.
Note
If your Pivot
If you wish to prevent column widths from being automatically adjusted when the Pivot
// Access the pivot table by its name in the collection.
PivotTable pivotTable = worksheet.PivotTables["PivotTable1"];
// Refresh the pivot table.
pivotTable.Cache.Refresh();
To refresh all pivot tables in a workbook at once, use the PivotCacheCollection.RefreshAll method.