Skip to content

Class ExcelPivotTableFieldCollection

Namespace: OfficeOpenXml.Table.PivotTable
Assembly: EPPlus.dll

A collection of pivot table fields

public class ExcelPivotTableFieldCollection : ExcelPivotTableFieldCollectionBase<ExcelPivotTableField>, IEnumerable<ExcelPivotTableField>, IEnumerable

Inheritance

object ← ExcelPivotTableFieldCollectionBase<ExcelPivotTableField> ← ExcelPivotTableFieldCollection

Implements

IEnumerable
IEnumerable<ExcelPivotTableField>

Inherited Members

ExcelPivotTableFieldCollectionBase<ExcelPivotTableField>.Count
ExcelPivotTableFieldCollectionBase<ExcelPivotTableField>.GetEnumerator()
ExcelPivotTableFieldCollectionBase<ExcelPivotTableField>.this[int]
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

this[string]

Indexer by name

public ExcelPivotTableField this[string name] { get; }

Property Value

ExcelPivotTableField

Methods

AddCalculatedField(string, string)

Adds a calculated field to the underlaying pivot table cache.

public ExcelPivotTableField AddCalculatedField(string name, string formula)

Parameters

name string

The unique name of the field

formula string

The formula for the calculated field. Note: In formulas you create for calculated fields or calculated items, you can use operators and expressions as you do in other worksheet formulas. You can use constants and refer to data from the pivot table, but you cannot use cell references or defined names.You cannot use worksheet functions that require cell references or defined names as arguments, and you cannot use array functions. Formula

Returns

ExcelPivotTableField

The new calculated field

GetDateGroupField(eDateGroupBy)

Returns the date group field.

public ExcelPivotTableField GetDateGroupField(eDateGroupBy GroupBy)

Parameters

GroupBy eDateGroupBy

The type of grouping

Returns

ExcelPivotTableField

The matching field. If none is found null is returned

GetNumericGroupField()

Returns the numeric group field.

public ExcelPivotTableField GetNumericGroupField()

Returns

ExcelPivotTableField

The matching field. If none is found null is returned