Table of Contents

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

ExcelPivotTableAreaStyle

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 ExcelPivotTableField

The field with the box to style

Returns

ExcelPivotTableAreaStyle

AddButtonField(ePivotTableAxis, int)

Adds a style for filter boxes.

public ExcelPivotTableAreaStyle AddButtonField(ePivotTableAxis axis, int index = 0)

Parameters

axis ePivotTableAxis

The axis for the field buttons

index int

The zero-based index in the axis collection

Returns

ExcelPivotTableAreaStyle

AddData(params ExcelPivotTableField[])

Adds a style for the data area of a pivot table

public ExcelPivotTableAreaStyle AddData(params ExcelPivotTableField[] fields)

Parameters

fields ExcelPivotTableField[]

Returns

ExcelPivotTableAreaStyle

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

ExcelPivotTableAreaStyle

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

ExcelPivotTableAreaStyle

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 string

Offset 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

ExcelPivotTableAreaStyle

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 string

Offset 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

ExcelPivotTableAreaStyle

AddWholeTable()

Adds a pivot area style that affects the whole table.

public ExcelPivotTableAreaStyle AddWholeTable()

Returns

ExcelPivotTableAreaStyle

The style object used to set the styles