Class ExcelPivotTableCollection¶
Namespace: OfficeOpenXml.Table.PivotTable
Assembly: EPPlus.dll
A collection of pivottable objects
Inheritance¶
object ← ExcelPivotTableCollection
Implements¶
IEnumerable
IEnumerable<ExcelPivotTable>
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
Count¶
Number of items in the collection
Property Value¶
this[int]¶
The pivottable Index. Base 0.
Property Value¶
this[string]¶
Pivottabes accesed by name
Property Value¶
Methods¶
Add(ExcelAddressBase, ExcelRangeBase, string)¶
Create a pivottable on the supplied range
Parameters¶
Range ExcelAddressBase
The range address including header and total row
Source ExcelRangeBase
The Source data range address
Name string
The name of the pivottable. Must be unique
Returns¶
The pivot table object
Add(ExcelAddressBase, ExcelConnection, string, string[])¶
Create a pivot table with an external connection as source. Please note the EPPlus do not excute the connection query, so EPPlus will depend on the spread sheet application to calculate and render the pivot table.
public ExcelPivotTable Add(ExcelAddressBase Range, ExcelConnection Connection, string Name, string[] Fields)
Parameters¶
Range ExcelAddressBase
The range address including header and total row
Connection ExcelConnection
The connection to use as source.
Name string
The name of the pivottable. Must be unique
Fields string[]
Field names matching the output of the pivot table.
Returns¶
The pivot table object
Add(ExcelAddressBase, ExcelTable, string)¶
Create a pivottable on the supplied range
Parameters¶
Range ExcelAddressBase
The range address including header and total row
Source ExcelTable
The source table
Name string
The name of the pivottable. Must be unique
Returns¶
The pivottable object
Add(ExcelAddressBase, ExcelPivotCacheDefinition, string)¶
Create a pivottable on the supplied range
public ExcelPivotTable Add(ExcelAddressBase Range, ExcelPivotCacheDefinition PivotCacheDefinition, string Name)
Parameters¶
Range ExcelAddressBase
The range address including header and total row
PivotCacheDefinition ExcelPivotCacheDefinition
A pivot table cache shared with another pivot table
Name string
The name of the pivottable. Must be unique
Returns¶
The pivottable object
Calculate(bool)¶
Calculate all pivot tables in the collection. Also see Calculate(bool) and CalculateAllPivotTables(bool)
Parameters¶
refresh bool
If the cache should be refreshed.
Delete(string, bool)¶
Delete the pivottable with the supplied name
Parameters¶
Name string
The name of the pivottable
ClearRange bool
Clear the table range
Delete(int, bool)¶
Delete the pivot table at the specified index
Parameters¶
Index int
The index in the PivotTable collection
ClearRange bool
Clear the table range
Delete(ExcelPivotTable, bool)¶
Delete the supplied pivot table
Parameters¶
PivotTable ExcelPivotTable
The PivotTable to remove from the collection
ClearRange bool
Clear the table range
GetEnumerator()¶
Gets the enumerator of the collection
Returns¶
The enumerator