Class ExcelPivotTableCalculatedData
Represents a selection of a row or column field to retreive the calculated value from a pivot table.
Inheritance
Inherited Members
Namespace: OfficeOpenXml.Table.PivotTable
Assembly: EPPlus.dll
Syntax
public class ExcelPivotTableCalculatedData
Methods
GetValue(Int32)
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 |
---|---|---|
System.Int32 | dataFieldIndex | The index for the date field in the DataFields collection |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | dataFieldName |
Returns
Type | Description |
---|---|
System.Object |
SelectField(String, Object)
Specifies which value to use for a field.
Declaration
public ExcelPivotTableCalculatedData SelectField(string fieldName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | fieldName | The name of the field |
System.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 |
---|---|---|
System.String | fieldName | The name of the field |
System.Object | value | The value |
eSubTotalFunctions | subtotalFunction |
Returns
Type | Description |
---|---|
ExcelPivotTableCalculatedData |