PivotTableFormatCollection

PivotTableFormatCollection class

Represents the collection of formats applied to PivotTable.

class PivotTableFormatCollection;

Methods

MethodDescription
get(number)Gets the format by the index.
add()Add a PivotTableFormat.
format(number, number, Style)Formats the cell in the pivottable area
format(PivotArea, Style)Formats selected area of the PivotTable.
format(CellArea, Style)Formats selected area of the PivotTable.
formatArea(PivotFieldType, number, PivotFieldSubtotalType, PivotTableSelectionType, boolean, boolean, Style)Formats selected area.

get(number)

Gets the format by the index.

get(index: number) : PivotTableFormat;

Parameters:

ParameterTypeDescription
indexnumberThe index.

Returns

PivotTableFormat

add()

Add a PivotTableFormat.

add() : number;

Returns

The index of new format.

format(number, number, Style)

Formats the cell in the pivottable area

format(row: number, column: number, style: Style) : void;

Parameters:

ParameterTypeDescription
rownumberRow Index of the cell
columnnumberColumn index of the cell
styleStyleStyle which is to format the cell

format(PivotArea, Style)

Formats selected area of the PivotTable.

format(pivotArea: PivotArea, style: Style) : void;

Parameters:

ParameterTypeDescription
pivotAreaPivotAreaThe selected pivot view area.
styleStyleThe formatted setting.

format(CellArea, Style)

Formats selected area of the PivotTable.

format(ca: CellArea, style: Style) : void;

Parameters:

ParameterTypeDescription
caCellAreaThe range of the cells.
styleStyleThe style

formatArea(PivotFieldType, number, PivotFieldSubtotalType, PivotTableSelectionType, boolean, boolean, Style)

Formats selected area.

formatArea(axisType: PivotFieldType, fieldPosition: number, subtotalType: PivotFieldSubtotalType, selectionType: PivotTableSelectionType, isGrandRow: boolean, isGrandColumn: boolean, style: Style) : PivotTableFormat;

Parameters:

ParameterTypeDescription
axisTypePivotFieldTypeThe region of the PivotTable to which this rule applies.
fieldPositionnumberPosition of the field within the axis to which this rule applies.
subtotalTypePivotFieldSubtotalTypeThe subtotal filter type of the pivot field
selectionTypePivotTableSelectionTypeIndicates how to select data.
isGrandRowbooleanIndicates whether selecting grand total rows.
isGrandColumnbooleanIndicates whether selecting grand total columns.
styleStyleThe style which appies to the area of the pivot table.

Returns

PivotTableFormat