Show / Hide Table of Contents

Class ExcelPivotTableCollection

A collection of pivottable objects

Inheritance
System.Object
ExcelPivotTableCollection
Implements
System.Collections.Generic.IEnumerable<ExcelPivotTable>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.Table.PivotTable
Assembly: EPPlus.dll
Syntax
public class ExcelPivotTableCollection : IEnumerable<ExcelPivotTable>, IEnumerable

Properties

Count

Number of items in the collection

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Item[Int32]

The pivottable Index. Base 0.

Declaration
public ExcelPivotTable this[int Index] { get; }
Parameters
Type Name Description
System.Int32 Index
Property Value
Type Description
ExcelPivotTable

Item[String]

Pivottabes accesed by name

Declaration
public ExcelPivotTable this[string Name] { get; }
Parameters
Type Name Description
System.String Name

The name of the pivottable

Property Value
Type Description
ExcelPivotTable

The Pivotable. Null if the no match is found

Methods

Add(ExcelAddressBase, ExcelRangeBase, String)

Create a pivottable on the supplied range

Declaration
public ExcelPivotTable Add(ExcelAddressBase Range, ExcelRangeBase Source, string Name)
Parameters
Type Name Description
ExcelAddressBase Range

The range address including header and total row

ExcelRangeBase Source

The Source data range address

System.String Name

The name of the pivottable. Must be unique

Returns
Type Description
ExcelPivotTable

The pivottable object

Add(ExcelAddressBase, ExcelTable, String)

Create a pivottable on the supplied range

Declaration
public ExcelPivotTable Add(ExcelAddressBase Range, ExcelTable Source, string Name)
Parameters
Type Name Description
ExcelAddressBase Range

The range address including header and total row

ExcelTable Source

The source table

System.String Name

The name of the pivottable. Must be unique

Returns
Type Description
ExcelPivotTable

The pivottable object

Delete(ExcelPivotTable, Boolean)

Declaration
public void Delete(ExcelPivotTable PivotTable, bool ClearRange = false)
Parameters
Type Name Description
ExcelPivotTable PivotTable
System.Boolean ClearRange

Delete(Int32, Boolean)

Delete the pivottable at the specified index

Declaration
public void Delete(int Index, bool ClearRange = false)
Parameters
Type Name Description
System.Int32 Index

The index in the PivotTable collection

System.Boolean ClearRange

Clear the table range

Delete(String, Boolean)

Delete the pivottable with the supplied name

Declaration
public void Delete(string Name, bool ClearRange = false)
Parameters
Type Name Description
System.String Name

The name of the pivottable

System.Boolean ClearRange

Clear the table range

GetEnumerator()

Gets the enumerator of the collection

Declaration
public IEnumerator<ExcelPivotTable> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<ExcelPivotTable>

The enumerator

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Back to top Generated by DocFX