Class ExcelPivotTableCalculatedData
Represents a selection of a row or column field to retreive the calculated value from a pivot table.
Inherited Members
Namespace: OfficeOpenXml.Table.PivotTable
Assembly: EPPlus.dll
Syntax
public class ExcelPivotTableCalculatedData
Methods
GetValue(int)
Get the value for the current field selection. SelectField(string, object) SelectField(string, object, eSubTotalFunctions)
Declaration
public object GetValue(int dataFieldIndex = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| int | dataFieldIndex | The index for the date field in the DataFields collection |
Returns
| Type | Description |
|---|---|
| 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. |
GetValue(string)
Get the value for the current field selection. SelectField(string, object) SelectField(string, object, eSubTotalFunctions)
Declaration
public object GetValue(string dataFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | dataFieldName |
Returns
| Type | Description |
|---|---|
| object |
SelectField(string, object)
Specifies which value to use for a field.
Declaration
public ExcelPivotTableCalculatedData SelectField(string fieldName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fieldName | The name of the field |
| object | value | The value |
Returns
| Type | Description |
|---|---|
| ExcelPivotTableCalculatedData | A new ExcelPivotTableCalculatedData to select other row or column field values or fetch the calulated value in a fluent way. |
See Also
SelectField(string, object, eSubTotalFunctions)
Specifies which value to use for a field.
Declaration
public ExcelPivotTableCalculatedData SelectField(string fieldName, object value, eSubTotalFunctions subtotalFunction)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fieldName | The name of the field |
| object | value | The value |
| eSubTotalFunctions | subtotalFunction |
Returns
| Type | Description |
|---|---|
| ExcelPivotTableCalculatedData |