ConditionalFormat Object (JavaScript API for Excel)

An object encapsulating a conditional format's range, format, rule, and other properties.

Properties

Property Type Description Req. Set
priority int The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also 1.6
stopIfTrue bool If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. 1.6
type string A type of conditional format. Only one can be set at a time. Read-Only. Read-only. Possible values are: Custom, DataBar, ColorScale, IconSet. 1.6

See property access examples.

Relationships

Relationship Type Description Req. Set
cellValue CellValueConditionalFormat Returns the cell value conditional format properties if the current conditional format is a CellValue type. Read-only. 1.6
cellValueOrNullObject CellValueConditionalFormat Returns the cell value conditional format properties if the current conditional format is a CellValue type. Read-only. 1.6
colorScale ColorScaleConditionalFormat Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. 1.6
colorScaleOrNullObject ColorScaleConditionalFormat Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. Read-only. 1.6
custom CustomConditionalFormat Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. 1.6
customOrNullObject CustomConditionalFormat Returns the custom conditional format properties if the current conditional format is a custom type. Read-only. 1.6
dataBar DataBarConditionalFormat Returns the data bar properties if the current conditional format is a data bar. Read-only. 1.6
dataBarOrNullObject DataBarConditionalFormat Returns the data bar properties if the current conditional format is a data bar. Read-only. 1.6
iconSet IconSetConditionalFormat Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. 1.6
iconSetOrNullObject IconSetConditionalFormat Returns the IconSet conditional format properties if the current conditional format is an IconSet type. Read-only. 1.6
preset PresetCriteriaConditionalFormat Returns the preset criteria conditional format such as above averagebelow averageunique valuescontains blanknonblankerrornoerror properties. Read-only. 1.6
presetOrNullObject PresetCriteriaConditionalFormat Returns the preset criteria conditional format such as above averagebelow averageunique valuescontains blanknonblankerrornoerror properties. Read-only. 1.6
textComparison TextConditionalFormat Returns the specific text conditional format properties if the current conditional format is a text type. Read-only. 1.6
textComparisonOrNullObject TextConditionalFormat Returns the specific text conditional format properties if the current conditional format is a text type. Read-only. 1.6
topBottom TopBottomConditionalFormat Returns the TopBottom conditional format properties if the current conditional format is an TopBottom type. Read-only. 1.6
topBottomOrNullObject TopBottomConditionalFormat Returns the TopBottom conditional format properties if the current conditional format is an TopBottom type. Read-only. 1.6

Methods

Method Return Type Description Req. Set
delete() void Deletes this conditional format. 1.6
getRange() Range Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. 1.6
getRangeOrNullObject() Range Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. 1.6

Method Details

delete()

Deletes this conditional format.

Syntax

conditionalFormatObject.delete();

Parameters

None

Returns

void

getRange()

Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only.

Syntax

conditionalFormatObject.getRange();

Parameters

None

Returns

Range

getRangeOrNullObject()

Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only.

Syntax

conditionalFormatObject.getRangeOrNullObject();

Parameters

None

Returns

Range

Property access examples