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
Parameter | Type | Description |
---|---|---|
operator | IAverageHighlightCell |
Returns
this
Memberof
ConditionalFormatHighlightRuleBuilder
setBackground()
setBackground(color?): this
Sets the background color
Parameters
Parameter | Type | Description |
---|---|---|
color ? | string |
Returns
this
Memberof
ConditionalFormatRuleBuilder
setBold()
setBold(isBold): this
Set Bold
Parameters
Parameter | Type | Description |
---|---|---|
isBold | boolean |
Returns
this
Memberof
ConditionalFormatRuleBuilder
setDuplicateValues()
setDuplicateValues(): this
Set duplicateValues rule
Returns
this
Memberof
ConditionalFormatHighlightRuleBuilder
setFontColor()
setFontColor(color?): this
Sets the font color
Parameters
Parameter | Type | Description |
---|---|---|
color ? | string |
Returns
this
Memberof
ConditionalFormatRuleBuilder
setItalic()
setItalic(isItalic): this
Set the text to italic
Parameters
Parameter | Type | Description |
---|---|---|
isItalic | boolean |
Returns
this
Memberof
ConditionalFormatRuleBuilder
setRanges()
setRanges(ranges): this
Sets the scope for conditional formatting
Parameters
Parameter | Type | Description |
---|---|---|
ranges | IRange [] |
Returns
this
Memberof
ConditionalFormatRuleBuilder
Inherited from
ConditionalFormatRuleBaseBuilder.setRanges
setRank()
setRank(config): this
Set rank rule
Parameters
Parameter | Type | Description |
---|---|---|
config | { isBottom : boolean ; isPercent : boolean ; value : number ; } | |
config.isBottom | boolean | |
config.isPercent | boolean | |
config.value | number |
Returns
this
Memberof
ConditionalFormatHighlightRuleBuilder
setStrikethrough()
setStrikethrough(isStrikethrough): this
Set the strikethrough
Parameters
Parameter | Type | Description |
---|---|---|
isStrikethrough | boolean |
Returns
this
Memberof
ConditionalFormatRuleBuilder
setUnderline()
setUnderline(isUnderline): this
Set the underscore
Parameters
Parameter | Type | Description |
---|---|---|
isUnderline | boolean |
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
Parameter | Type | Description |
---|---|---|
date | CFTimePeriodOperator |
Returns
this
Memberof
ConditionalFormatRuleBuilder
whenFormulaSatisfied()
whenFormulaSatisfied(formulaString): this
Sets a conditional formatting rule to fire when a given formula evaluates to true.
Parameters
Parameter | Type | Description |
---|---|---|
formulaString | string | formulaString 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
Parameter | Type | Description |
---|---|---|
start | number | |
end | number |
Returns
this
Memberof
ConditionalFormatRuleBuilder
whenNumberEqualTo()
whenNumberEqualTo(value): this
Sets the conditional formatting rule to fire when the number equals the given value
Parameters
Parameter | Type | Description |
---|---|---|
value | number |
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
Parameter | Type | Description |
---|---|---|
value | number |
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
Parameter | Type | Description |
---|---|---|
value | number |
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
Parameter | Type | Description |
---|---|---|
value | number |
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
Parameter | Type | Description |
---|---|---|
value | number |
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
Parameter | Type | Description |
---|---|---|
start | number | |
end | number |
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
Parameter | Type | Description |
---|---|---|
value | number |
Returns
this
Memberof
ConditionalFormatRuleBuilder
whenTextContains()
whenTextContains(text): this
Sets the conditional formatting rule to fire when the input contains the given value.
Parameters
Parameter | Type | Description |
---|---|---|
text | string |
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
Parameter | Type | Description |
---|---|---|
text | string |
Returns
this
Memberof
ConditionalFormatRuleBuilder
whenTextEndsWith()
whenTextEndsWith(text): this
Sets a conditional formatting rule to fire when input ends with a specified value.
Parameters
Parameter | Type | Description |
---|---|---|
text | string |
Returns
this
Memberof
ConditionalFormatRuleBuilder
whenTextEqualTo()
whenTextEqualTo(text): this
Sets the conditional formatting rule to fire when the input equals the given value.
Parameters
Parameter | Type | Description |
---|---|---|
text | string |
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
Parameter | Type | Description |
---|---|---|
text | string |
Returns
this
Memberof
ConditionalFormatRuleBuilder