The ItemsToRetain class represents the number of items a PivotTable cache will retain even changes have been made to the data source.
public sealed class ItemsToRetain
Public NotInheritable Class ItemsToRetain
ExcelApplication xla = new ExcelApplication(); Workbook wb = xla.Open("template.xlsx"); ItemsToRetain items = wb[0].PivotTables[0].PivotTableSettings.ItemsToRetain;
Dim xla As New ExcelApplication() Dim wb As Workbook = xla.Open("template.xlsx") Dim items As ItemsToRetain = wb(0).PivotTables(0).PivotTableSettings.ItemsToRetain;
Name
Description
Automatic
None
Max
Value