Skip to Content
ClassesConditionalFormatHighlightRuleBuilder

Class: ConditionalFormatHighlightRuleBuilder

Extends

  • ConditionalFormatRuleBaseBuilder

Methods

build()

build(): IConditionFormattingRule<IConditionalFormattingRuleConfig>

Returns

IConditionFormattingRule<IConditionalFormattingRuleConfig>

Inherited from

ConditionalFormatRuleBaseBuilder.build

copy()

copy(): ConditionalFormatHighlightRuleBuilder

Deep clone a current builder.

Returns

ConditionalFormatHighlightRuleBuilder

Memberof

ConditionalFormatRuleBuilder

Overrides

ConditionalFormatRuleBaseBuilder.copy

createCfId()

createCfId(): string

Create a conditional format ID.

Returns

string

Memberof

ConditionalFormatRuleBuilder

Inherited from

ConditionalFormatRuleBaseBuilder.createCfId

getIconMap()

getIconMap(): Record<string, ...[]>

Get the icon set mapping dictionary

Returns

Record<string, …[]>

Inherited from

ConditionalFormatRuleBaseBuilder.getIconMap

getRanges()

getRanges(): IRange[]

Gets the scope of the current conditional format

Returns

IRange[]

Memberof

ConditionalFormatRuleBuilder

Inherited from

ConditionalFormatRuleBaseBuilder.getRanges

setAverage()

setAverage(operator): this

Set average rule

Parameters

ParameterTypeDescription
operatorIAverageHighlightCell

Returns

this

Memberof

ConditionalFormatHighlightRuleBuilder


setBackground()

setBackground(color?): this

Sets the background color

Parameters

ParameterTypeDescription
color?string

Returns

this

Memberof

ConditionalFormatRuleBuilder


setBold()

setBold(isBold): this

Set Bold

Parameters

ParameterTypeDescription
isBoldboolean

Returns

this

Memberof

ConditionalFormatRuleBuilder


setDuplicateValues()

setDuplicateValues(): this

Set duplicateValues rule

Returns

this

Memberof

ConditionalFormatHighlightRuleBuilder


setFontColor()

setFontColor(color?): this

Sets the font color

Parameters

ParameterTypeDescription
color?string

Returns

this

Memberof

ConditionalFormatRuleBuilder


setItalic()

setItalic(isItalic): this

Set the text to italic

Parameters

ParameterTypeDescription
isItalicboolean

Returns

this

Memberof

ConditionalFormatRuleBuilder


setRanges()

setRanges(ranges): this

Sets the scope for conditional formatting

Parameters

ParameterTypeDescription
rangesIRange[]

Returns

this

Memberof

ConditionalFormatRuleBuilder

Inherited from

ConditionalFormatRuleBaseBuilder.setRanges

setRank()

setRank(config): this

Set rank rule

Parameters

ParameterTypeDescription
config{ isBottom: boolean; isPercent: boolean; value: number; }
config.isBottomboolean
config.isPercentboolean
config.valuenumber

Returns

this

Memberof

ConditionalFormatHighlightRuleBuilder


setStrikethrough()

setStrikethrough(isStrikethrough): this

Set the strikethrough

Parameters

ParameterTypeDescription
isStrikethroughboolean

Returns

this

Memberof

ConditionalFormatRuleBuilder


setUnderline()

setUnderline(isUnderline): this

Set the underscore

Parameters

ParameterTypeDescription
isUnderlineboolean

Returns

this

Memberof

ConditionalFormatRuleBuilder


setUniqueValues()

setUniqueValues(): this

Set uniqueValues rule

Returns

this

Memberof

ConditionalFormatHighlightRuleBuilder


whenCellEmpty()

whenCellEmpty(): this

Sets the conditional formatting rule to fire when the cell is empty.

Returns

this


whenCellNotEmpty()

whenCellNotEmpty(): this

Sets the conditional formatting rule to fire when the cell is not empty

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenDate()

whenDate(date): this

Highlight when the date is in a time period, custom time is not supported.

Parameters

ParameterTypeDescription
dateCFTimePeriodOperator

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenFormulaSatisfied()

whenFormulaSatisfied(formulaString): this

Sets a conditional formatting rule to fire when a given formula evaluates to true.

Parameters

ParameterTypeDescription
formulaStringstringformulaString start with’ = ‘

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberBetween()

whenNumberBetween(start, end): this

Sets the conditional formatting rule to fire when a number is between two specified values or equal to one of them.

Parameters

ParameterTypeDescription
startnumber
endnumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberEqualTo()

whenNumberEqualTo(value): this

Sets the conditional formatting rule to fire when the number equals the given value

Parameters

ParameterTypeDescription
valuenumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberGreaterThan()

whenNumberGreaterThan(value): this

Sets the conditional formatting rule to fire when the number is greater than the given value

Parameters

ParameterTypeDescription
valuenumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberGreaterThanOrEqualTo()

whenNumberGreaterThanOrEqualTo(value): this

Sets a conditional formatting rule to fire when a number is greater than or equal to a given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberLessThan()

whenNumberLessThan(value): this

Sets a conditional formatting rule to fire when the number is less than the given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberLessThanOrEqualTo()

whenNumberLessThanOrEqualTo(value): this

Sets the conditional formatting rule to fire when the value is less than or equal to the given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberNotBetween()

whenNumberNotBetween(start, end): this

Sets a conditional formatting rule to fire when a number is not between two specified values and is not equal to them.

Parameters

ParameterTypeDescription
startnumber
endnumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenNumberNotEqualTo()

whenNumberNotEqualTo(value): this

Sets the conditional formatting rule to fire when a number does not equal a given value.

Parameters

ParameterTypeDescription
valuenumber

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenTextContains()

whenTextContains(text): this

Sets the conditional formatting rule to fire when the input contains the given value.

Parameters

ParameterTypeDescription
textstring

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenTextDoesNotContain()

whenTextDoesNotContain(text): this

Sets a conditional formatting rule to fire when the input does not contain the given value.

Parameters

ParameterTypeDescription
textstring

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenTextEndsWith()

whenTextEndsWith(text): this

Sets a conditional formatting rule to fire when input ends with a specified value.

Parameters

ParameterTypeDescription
textstring

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenTextEqualTo()

whenTextEqualTo(text): this

Sets the conditional formatting rule to fire when the input equals the given value.

Parameters

ParameterTypeDescription
textstring

Returns

this

Memberof

ConditionalFormatRuleBuilder


whenTextStartsWith()

whenTextStartsWith(text): this

Sets the conditional formatting rule to fire when the input value begins with the given value.

Parameters

ParameterTypeDescription
textstring

Returns

this

Memberof

ConditionalFormatRuleBuilder