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