Refreshing a Pivot Cache

The Refresh method refreshes both the pivot cache and the pivot table.

However, we can prevent a pivot table from being refreshed, either through the user interface (the Refresh data menu item on the PivotTable menu) or through code, by setting the EnableRefresh property to False.

The read-write Boolean RefreshOnFileOpen property is True if the PivotTable cache is automatically updated each time the workbook is opened by the user. The default value is False. Note that this property is ignored if the EnableRefresh property is set to False. Note also that the PivotTable cache is not automatically refreshed when the workbook is opened through code, even if RefreshOnFileOpen is True.

The RefreshDate property returns the date on which the pivot cache was last refreshed, and the RefreshName property returns the name of the user who last refreshed the cache.

0 0

Post a comment