Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Wiki Markup
{introducedin: 8.4

...

Description

Excerpt

The ItemsToRetain class represents the number of items a PivotTable cache will retain even changes have been made to the data source.

{signature}

{example}{code:csharp|title=C#}

          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Open("template.xlsx");
          ItemsToRetain items = wb[0].PivotTables[0].PivotTableSettings.ItemsToRetain;
        
{code}
{code:vbnet|title=vb.net
}

          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Open("template.xlsx")
          Dim items As ItemsToRetain = wb(0).PivotTables(0).PivotTableSettings.ItemsToRetain;
        
Signature
C#C#
}
{description}
{excerpt}The ItemsToRetain class represents the number of items a PivotTable cache will retain even changes have been made to the data source.{excerpt}
{signature:C#}
 public sealed class ItemsToRetain
Signature
{signature}{signature:vb.net
vb.net
}
Public NotInheritable Class ItemsToRetain
Example
Code Block
csharpcsharp
titleC#
Code Block
vbnetvbnettitle
Fields

...

Name

...

Description

...

Automatic

...

None

...

Properties

...

Name

...

Description

...

Max

...

Value

...

Remarks
Setting PivotTableSettings.ItemsToRetain is the same as going to PivotTable Options > Data > Retain items deleted from the data source and setting Number of items to retain per field to Automatic, Max, None, or a different integer value.
{code}

{example}
{fields}
|| Name || Description ||
| [Automatic|ItemsToRetain.Automatic] | {excerpt-include:ItemsToRetain.Automatic|nopanel=true} |
| [None|ItemsToRetain.None] | {excerpt-include:ItemsToRetain.None|nopanel=true} |
{properties}
|| Name || Description ||
| [Max|ItemsToRetain.Max] | {excerpt-include:ItemsToRetain.Max|nopanel=true} |
| [Value|ItemsToRetain.Value] | {excerpt-include:ItemsToRetain.Value|nopanel=true} |

{remarks}
Setting {{[PivotTableSettings.ItemsToRetain]}} is the same as going to _PivotTable Options_ > _Data_ > _Retain items deleted from the data source_ and setting _Number of items to retain per field_ to *Automatic*, *Max*, *None*, or a different integer value.
{remarks}