Exposes properties which control the coloring of a [[WorksheetCell]] based on the cell's value as relative to minimum, midpoint, and maximum threshold values.

ColorScaleConditionalFormat

new ColorScaleConditionalFormat(a: number): ColorScaleConditionalFormat

Returns ColorScaleConditionalFormat

$t: Type

Inherited from: ThresholdConditionBase

priority: number

Inherited from: ThresholdConditionBase

stopIfTrue: boolean

Returns a [[ColorScaleType]] value which identifies this instance as a 2-color or 3-color scale.

get colorScaleType(): ColorScaleType

Returns ColorScaleType

Inherited from: ThresholdConditionBase

Returns a [[FormatConditionType]] value which identifies the type of condition for this instance.

get conditionType(): FormatConditionType

Returns FormatConditionType

Inherited from: ThresholdConditionBase

Returns the formula which determines the values to which this condition applies. Note: the formula should return a boolean result. When the formula is applied to cells in the region if the formula returns false then those cells will not be included in the formatting.

get formula(): Formula

Returns Formula

Returns a [[ColorScaleCriterion]] object which defines the properties of the maximum threshold for this instance.

get maximumThreshold(): ColorScaleCriterion

Returns ColorScaleCriterion

Returns a [[ColorScaleCriterion]] object which defines the properties of the midpoint threshold for this instance.

get midpointThreshold(): ColorScaleCriterion

Returns ColorScaleCriterion

Returns a [[ColorScaleCriterion]] object which defines the properties of the minimum threshold for this instance.

get minimumThreshold(): ColorScaleCriterion

Returns ColorScaleCriterion

Inherited from: ThresholdConditionBase

Returns the [[WorksheetRegion]] which identifies the cell range with which this condition is associated.

get regions(): ReadOnlyCollection$1<WorksheetRegion>

Returns ReadOnlyCollection$1<WorksheetRegion>

Inherited from: ThresholdConditionBase

Returns a reference to the associated workbook.

get workbook(): Workbook

Returns Workbook

Inherited from: ThresholdConditionBase

Returns a reference to the associated worksheet.

get worksheet(): Worksheet

Returns Worksheet

Inherited from: ThresholdConditionBase

Sets the [[priority]] value for this rule such that it is the first condition to be evaluated. Applicable only in the case where there is more than one element contained within the associated collection.

setFirstPriority(): void

Returns void

Inherited from: ThresholdConditionBase

Assigns a new [[Formula]] to the [[formula]] property. Note: the formula should return a boolean result. When the formula is applied to cells in the region if the formula returns false then those cells will not be included in the formatting.

setFormula(formula: string, cellReferenceMode: CellReferenceMode): void

Parameters

  • formula: string

    The string representation of the formula.

  • cellReferenceMode: CellReferenceMode

    A [[CellReferenceMode]] value which specifies whether the 'formula' parameter should be interpreted as an A1 or R1C1 expression. This parameter is optional and defaults to null, in which case the [[Workbook.cellReferenceMode]] property is used.

Returns void

Inherited from: ThresholdConditionBase

Sets the [[priority]] value for this rule such that it is the last condition to be evaluated. Applicable only in the case where there is more than one element contained within the associated [[ConditionalFormatCollection]].

setLastPriority(): void

Returns void

Inherited from: ThresholdConditionBase

Replaces the existing regions with new ones

setRegions(regionAddress: string, cellReferenceMode: CellReferenceMode): void

Parameters

  • regionAddress: string

    A string with one or more comma separated region address

  • cellReferenceMode: CellReferenceMode

    An optional cell reference mode

Returns void

Inherited from: ThresholdConditionBase

staticInit(): void

Returns void