Skip to content

Class ExcelPivotTableCalculatedData

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

Represents a selection of a row or column field to retreive the calculated value from a pivot table.

public class ExcelPivotTableCalculatedData

Inheritance

object ← ExcelPivotTableCalculatedData

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Methods

GetValue(string)

Get the value for the current field selection. SelectField(string, object) SelectField(string, object, eSubTotalFunctions)

public object GetValue(string dataFieldName)

Parameters

dataFieldName string

Returns

object

GetValue(int)

Get the value for the current field selection. SelectField(string, object) SelectField(string, object, eSubTotalFunctions)

public object GetValue(int dataFieldIndex = 0)

Parameters

dataFieldIndex int

The index for the date field in the DataFields collection

Returns

object

The value from the pivot table. If data field does not exist of the selected fields does not match any part of the pivot table a #REF! error is retuned.

SelectField(string, object)

Specifies which value to use for a field.

public ExcelPivotTableCalculatedData SelectField(string fieldName, object value)

Parameters

fieldName string

The name of the field

value object

The value

Returns

ExcelPivotTableCalculatedData

A new ExcelPivotTableCalculatedData to select other row or column field values or fetch the calulated value in a fluent way.

See Also

ExcelPivotTableCalculatedData.GetValue\([string](https://learn.microsoft.com/dotnet/api/system.string)\)

SelectField(string, object, eSubTotalFunctions)

Specifies which value to use for a field.

public ExcelPivotTableCalculatedData SelectField(string fieldName, object value, eSubTotalFunctions subtotalFunction)

Parameters

fieldName string

The name of the field

value object

The value

subtotalFunction eSubTotalFunctions

Returns

ExcelPivotTableCalculatedData