PivotConditionalFormat

PivotConditionalFormat class

Represents a PivotTable Format Condition in PivotFormatCondition Collection.

class PivotConditionalFormat;

Properties

PropertyTypeDescription
pivotAreasPivotAreaCollectionReadonly. Gets all pivot areas.
formatConditionsFormatConditionCollectionReadonly. Get conditions for the pivot table conditional format .
scopeTypePivotConditionFormatScopeTypeGet and set scope type for the pivot table conditional format .
ruleTypePivotConditionFormatRuleTypeGet and set rule type for the pivot table condition format .

Methods

MethodDescription
getCellAreas()Gets all cell areas where this conditional format applies to.
addCellArea(CellArea)Adds an area based on pivot table view.
applyTo(number, number, PivotConditionFormatScopeType)Applies the conditional format to range. Only for the data region.
addFieldArea(PivotFieldType, string)Adds an area of pivot field.
addFieldArea(PivotFieldType, PivotField)Adds an area of pivot field.

pivotAreas

Readonly. Gets all pivot areas.

pivotAreas : PivotAreaCollection;

formatConditions

Readonly. Get conditions for the pivot table conditional format .

formatConditions : FormatConditionCollection;

scopeType

Get and set scope type for the pivot table conditional format .

scopeType : PivotConditionFormatScopeType;

ruleType

Get and set rule type for the pivot table condition format .

ruleType : PivotConditionFormatRuleType;

getCellAreas()

Gets all cell areas where this conditional format applies to.

getCellAreas() : CellArea[];

Returns

CellArea[]

addCellArea(CellArea)

Adds an area based on pivot table view.

addCellArea(ca: CellArea) : void;

Parameters:

ParameterTypeDescription
caCellAreaThe cell area.

applyTo(number, number, PivotConditionFormatScopeType)

Applies the conditional format to range. Only for the data region.

applyTo(row: number, column: number, scope: PivotConditionFormatScopeType) : void;

Parameters:

ParameterTypeDescription
rownumberThe selected row.
columnnumberThe selected column.
scopePivotConditionFormatScopeTypeThe scope

addFieldArea(PivotFieldType, string)

Adds an area of pivot field.

addFieldArea(axisType: PivotFieldType, fieldName: string) : void;

Parameters:

ParameterTypeDescription
axisTypePivotFieldTypeThe region type.
fieldNamestringThe name of pivot field.

addFieldArea(PivotFieldType, PivotField)

Adds an area of pivot field.

addFieldArea(axisType: PivotFieldType, field: PivotField) : void;

Parameters:

ParameterTypeDescription
axisTypePivotFieldTypeThe region type.
fieldPivotFieldThe pivot field.