Class ExcelPivotTableField¶
Namespace: OfficeOpenXml.Table.PivotTable
Assembly: EPPlus.dll
A pivot table field.
Inheritance¶
object ← XmlHelper ← ExcelPivotTableField
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
AutoSort¶
Auto sort for a field. Sort is set on a data field for a row/column field. Use SetAutoSort(ExcelPivotTableDataField, eSortType) to set auto sort Use RemoveAutoSort to remove auto sort and set this property to null
Property Value¶
Axis¶
Type of axis
Property Value¶
Cache¶
A reference to the cache for the pivot table field.
Property Value¶
Compact¶
Compact mode
Property Value¶
Filters¶
Filters used on the pivot table field.
Property Value¶
ExcelPivotTableFieldFilterCollection
Format¶
The numberformat to use for the column
Property Value¶
Grouping¶
Grouping settings. Null if the field has no grouping otherwise ExcelPivotTableFieldDateGroup or ExcelPivotTableFieldNumericGroup.
Property Value¶
IncludeNewItemsInFilter¶
A boolean that indicates whether manual filter is in inclusive mode
Property Value¶
Index¶
The index of the pivot table field
Property Value¶
IsColumnField¶
If the field is a column field
Property Value¶
IsDataField¶
If the field is a datafield
Property Value¶
IsPageField¶
If the field is a page field.
Property Value¶
IsRowField¶
If the field is a row field
Property Value¶
Items¶
Pivottable field Items. Used for grouping.
Property Value¶
ExcelPivotTableFieldItemsCollection
MultipleItemSelectionAllowed¶
Indicates whether the field can have multiple items selected in the page field
Property Value¶
Name¶
Name of the field
Property Value¶
Outline¶
A boolean that indicates whether the items in this field should be shown in Outline form
Property Value¶
PageFieldSettings¶
Page field settings
Property Value¶
ExcelPivotTablePageFieldSettings
ShowAll¶
Indicates whether to show all items for this field
Property Value¶
ShowAsCaption¶
Indicates whether to show the property as a member caption
Property Value¶
ShowDropDowns¶
Indicates whether to hide drop down buttons on PivotField headers
Property Value¶
ShowInFieldList¶
Indicates whether this hierarchy is omitted from the field list
Property Value¶
ShowMemberPropertyInCell¶
Indicates whether to show the member property value in a PivotTable cell
Property Value¶
ShowMemberPropertyToolTip¶
Indicates whether to show the member property value in a tooltip on the appropriate PivotTable cells
Property Value¶
Slicer¶
A slicer attached to the pivot table field. If the field has multiple slicers attached, the first slicer will be returned.
Property Value¶
Sort¶
The type of sort that is applied to this field
Property Value¶
SubTotalFunctions¶
Enumeration of the different subtotal operations that can be applied to page, row or column fields
Property Value¶
SubtotalTop¶
The custom text that is displayed for the subtotals label
Property Value¶
Methods¶
AddDateGrouping(eDateGroupBy)¶
Add a date grouping on this field.
Parameters¶
groupBy eDateGroupBy
Group by
AddDateGrouping(eDateGroupBy, DateTime, DateTime)¶
Add a date grouping on this field.
Parameters¶
groupBy eDateGroupBy
Group by
startDate DateTime
Fixed start date. Use DateTime.MinValue for auto
endDate DateTime
Fixed end date. Use DateTime.MaxValue for auto
AddDateGrouping(int, DateTime, DateTime)¶
Add a date grouping on this field.
Parameters¶
days int
Number of days when grouping on days
startDate DateTime
Fixed start date. Use DateTime.MinValue for auto
endDate DateTime
Fixed end date. Use DateTime.MaxValue for auto
AddNumericGrouping(double, double, double)¶
Add numberic grouping to the field
Parameters¶
Start double
Start value
End double
End value
Interval double
Interval
AddSlicer()¶
Will add a slicer to the pivot table field
Returns¶
The ExcelPivotTableSlicer?text=Slicer/>
RemoveAutoSort()¶
Remove auto sort and set the AutoSort property to null
SetAutoSort(ExcelPivotTableDataField, eSortType)¶
Set auto sort on a data field for this field.
public void SetAutoSort(ExcelPivotTableDataField dataField, eSortType sortType = eSortType.Ascending)
Parameters¶
dataField ExcelPivotTableDataField
The data field to sort on
sortType eSortType
Sort ascending or descending