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
getPivotAreas()@deprecated. Please use the ‘pivotAreas’ property instead. Gets all pivot areas.
getFormatConditions()@deprecated. Please use the ‘formatConditions’ property instead. Get conditions for the pivot table conditional format .
getScopeType()@deprecated. Please use the ‘scopeType’ property instead. Get and set scope type for the pivot table conditional format .
setScopeType(PivotConditionFormatScopeType)@deprecated. Please use the ‘scopeType’ property instead. Get and set scope type for the pivot table conditional format .
getRuleType()@deprecated. Please use the ‘ruleType’ property instead. Get and set rule type for the pivot table condition format .
setRuleType(PivotConditionFormatRuleType)@deprecated. Please use the ‘ruleType’ property instead. Get and set rule type for the pivot table condition format .
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.
isNull()Checks whether the implementation object is null.

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;

getPivotAreas()

@deprecated. Please use the ‘pivotAreas’ property instead. Gets all pivot areas.

getPivotAreas() : PivotAreaCollection;

Returns

PivotAreaCollection

getFormatConditions()

@deprecated. Please use the ‘formatConditions’ property instead. Get conditions for the pivot table conditional format .

getFormatConditions() : FormatConditionCollection;

Returns

FormatConditionCollection

getScopeType()

@deprecated. Please use the ‘scopeType’ property instead. Get and set scope type for the pivot table conditional format .

getScopeType() : PivotConditionFormatScopeType;

Returns

PivotConditionFormatScopeType

setScopeType(PivotConditionFormatScopeType)

@deprecated. Please use the ‘scopeType’ property instead. Get and set scope type for the pivot table conditional format .

setScopeType(value: PivotConditionFormatScopeType) : void;

Parameters:

ParameterTypeDescription
valuePivotConditionFormatScopeTypeThe value to set.

getRuleType()

@deprecated. Please use the ‘ruleType’ property instead. Get and set rule type for the pivot table condition format .

getRuleType() : PivotConditionFormatRuleType;

Returns

PivotConditionFormatRuleType

setRuleType(PivotConditionFormatRuleType)

@deprecated. Please use the ‘ruleType’ property instead. Get and set rule type for the pivot table condition format .

setRuleType(value: PivotConditionFormatRuleType) : void;

Parameters:

ParameterTypeDescription
valuePivotConditionFormatRuleTypeThe value to set.

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.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;