Table of Contents

Class ExcelPivotTableFieldCollection

Namespace
OfficeOpenXml.Table.PivotTable
Assembly
EPPlus.dll

A collection of pivot table fields

public class ExcelPivotTableFieldCollection : ExcelPivotTableFieldCollectionBase<ExcelPivotTableField>, IEnumerable<ExcelPivotTableField>, IEnumerable
Inheritance
ExcelPivotTableFieldCollection
Implements
Inherited Members

Properties

this[string]

Indexer by name

public ExcelPivotTableField this[string name] { get; }

Parameters

name string

The name

Property Value

ExcelPivotTableField

The pivot table field

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