Message-ID: <1484124950.7801.1711621881172.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7800_474126760.1711621881172" ------=_Part_7800_474126760.1711621881172 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ItemsToRetain

ItemsToRetain

Introduced in build 8.4

= =20

Description

The ItemsToRetain class represents the number of items a PivotTable = cache will retain even changes have been made to the data source.=20
C#
=20
 public sealed class ItemsToRetain
=20
=20
vb.net
=20
Public NotInheritable Class ItemsToRetain
=20
=20

Examples

=20
C#
=20
          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Open("template.xlsx");
          ItemsToRetain items =3D wb[0].PivotTables[0].PivotTableSettings.I=
temsToRetain;
        
=20
vb.net
=20
          Dim xla As New ExcelApplication()
          Dim wb As Workbook =3D xla.Open("template.xlsx")
          Dim items As ItemsToRetain =3D wb(0).PivotTables(0).PivotTableSet=
tings.ItemsToRetain;
        
=20
=20

Remarks

Setting=20 PivotTableSettings.Item= sToRetain is the same as going to=20 PivotTable Options >=20 Data >=20 Retain items deleted from the data source and setting=20 Number of items to retain per field to=20 Automatic,=20 Max,=20 None, or a different integer value.

Fields

Name

Description

Automatic

ItemsToRetain's value for automatic= .

N= one

ItemsToRetain's value for none.

Properties

Name

Description

Ma= x

Returns the maximum number of items the PivotTab= le's cache can support.

= Value

Sets or Returns the current number of items the = PivotTable's cache is set to retain.

 

 

------=_Part_7800_474126760.1711621881172--