The ItemsToRetain class represents the number of items a pivot table 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.Create();
          ItemsToRetain items = wb[0].PivotTables[0].PivotTableSettings.ItemsToRetain;
        

          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim pal As ItemsToRetain = wb[0].PivotTables[0].PivotTableSettings.ItemsToRetain;
        

Name

Description

Automatic

None

Name

Description

Max

Value