Class ExcelPivotTableAreaStyleCollection
- Namespace
- OfficeOpenXml.Table.PivotTable
- Assembly
- EPPlus.dll
A collection of pivot areas used for styling a pivot table.
public class ExcelPivotTableAreaStyleCollection : EPPlusReadOnlyList<ExcelPivotTableAreaStyle>, IEnumerable<ExcelPivotTableAreaStyle>, IEnumerable
- Inheritance
-
ExcelPivotTableAreaStyleCollection
- Implements
- Inherited Members
Methods
Add()
Adds a pivot area style for labels or data.
public ExcelPivotTableAreaStyle Add()
Returns
AddAllData()
Adds a pivot area style that affects all data cells
public ExcelPivotTableAreaStyle AddAllData()
Returns
- ExcelPivotTableAreaStyle
The style object used to set the styles
AddAllLabels()
Adds a pivot area style that affects all labels
public ExcelPivotTableAreaStyle AddAllLabels()
Returns
- ExcelPivotTableAreaStyle
The style object used to set the styles
AddButtonField(ExcelPivotTableField)
Adds a style for the filter box.
public ExcelPivotTableAreaStyle AddButtonField(ExcelPivotTableField field)
Parameters
field
ExcelPivotTableFieldThe field with the box to style
Returns
AddButtonField(ePivotTableAxis, int)
Adds a style for filter boxes.
public ExcelPivotTableAreaStyle AddButtonField(ePivotTableAxis axis, int index = 0)
Parameters
axis
ePivotTableAxisThe axis for the field buttons
index
intThe zero-based index in the axis collection
Returns
AddData(params ExcelPivotTableField[])
Adds a style for the data area of a pivot table
public ExcelPivotTableAreaStyle AddData(params ExcelPivotTableField[] fields)
Parameters
fields
ExcelPivotTableField[]
Returns
AddLabel(params ExcelPivotTableField[])
Adds a style for the labels of a pivot table
public ExcelPivotTableAreaStyle AddLabel(params ExcelPivotTableField[] fields)
Parameters
fields
ExcelPivotTableField[]The pivot table field that style affects
Returns
AddTopEnd()
Adds a pivot area style for the top right cells of the pivot table, to the right of any filter button, if reading order i set to Left-To-Right.
public ExcelPivotTableAreaStyle AddTopEnd()
Returns
AddTopEnd(string)
Adds a style for the top right cells of the pivot table, to the right of any filter button, if reading order i set to Left-To-Right.
public ExcelPivotTableAreaStyle AddTopEnd(string offsetAddress = null)
Parameters
offsetAddress
stringOffset address from the top-left cell to the right of any filter button. The top-left cell is refereced as A1. For example, B1:C1 will reference the second and third cell of the first row of the area. "null" will mean all cells
Returns
AddTopStart(string)
Adds a style for the top left cells of the pivot table, if reading order i set to Left-To-Right
public ExcelPivotTableAreaStyle AddTopStart(string offsetAddress = null)
Parameters
offsetAddress
stringOffset address from the left cell. The top-left cell is refereced as A1. For example, B1:C1 will reference the second and third cell of the first row of the area. "null" will mean all cells
Returns
AddWholeTable()
Adds a pivot area style that affects the whole table.
public ExcelPivotTableAreaStyle AddWholeTable()
Returns
- ExcelPivotTableAreaStyle
The style object used to set the styles