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