@univerjs/sheets-conditional-formatting v0.5.4
Class: FConditionalFormattingBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:642
Constructors
new FConditionalFormattingBuilder()
new FConditionalFormattingBuilder(_initConfig): FConditionalFormattingBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:643
Parameters
Parameter | Type |
---|---|
_initConfig | { ranges : IRange []; } |
_initConfig.ranges ? | IRange [] |
Returns
Methods
build()
build(): IConditionFormattingRule
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:647
Returns
setAverage()
setAverage(operator): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:656
Set average rule
Parameters
Parameter | Type |
---|---|
operator | | greaterThan | greaterThanOrEqual | lessThan | lessThanOrEqual | equal | notEqual |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatHighlightRuleBuilder
setBackground()
setBackground(color?): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:744
Sets the background color
Parameters
Parameter | Type |
---|---|
color ? | string |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setBold()
setBold(isBold): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:754
Set Bold
Parameters
Parameter | Type |
---|---|
isBold | boolean |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setColorScale()
setColorScale(config): ConditionalFormatColorScaleRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:705
Set colorScale rule
Parameters
Parameter | Type |
---|---|
config | { color : string ; index : number ; value : IValueConfig ; }[] |
Returns
ConditionalFormatColorScaleRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setDataBar()
setDataBar(config): ConditionalFormatDataBarRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:727
Set dataBar rule
Parameters
Parameter | Type |
---|---|
config | { isGradient : boolean ; isShowValue : boolean ; max : IValueConfig ; min : IValueConfig ; nativeColor : string ; positiveColor : string ; } |
config.isGradient ? | boolean |
config.isShowValue ? | boolean |
config.max | IValueConfig |
config.min | IValueConfig |
config.nativeColor | string |
config.positiveColor | string |
Returns
ConditionalFormatDataBarRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setDuplicateValues()
setDuplicateValues(): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:672
Set duplicateValues rule
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatHighlightRuleBuilder
setFontColor()
setFontColor(color?): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:764
Sets the font color
Parameters
Parameter | Type |
---|---|
color ? | string |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setIconSet()
setIconSet(config): ConditionalFormatIconSetRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:696
Set iconSet rule
Parameters
Parameter | Type |
---|---|
config | { iconConfigs : { iconId : string ; iconType : string ; operator : CFNumberOperator ; value : IValueConfig ; }[]; isShowValue : boolean ; } |
config.iconConfigs | { iconId : string ; iconType : string ; operator : CFNumberOperator ; value : IValueConfig ; }[] |
config.isShowValue | boolean |
Returns
ConditionalFormatIconSetRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setItalic()
setItalic(isItalic): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:774
Set the text to italic
Parameters
Parameter | Type |
---|---|
isItalic | boolean |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setRank()
setRank(config): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:684
Set rank rule
Parameters
Parameter | Type |
---|---|
config | { isBottom : boolean ; isPercent : boolean ; value : number ; } |
config.isBottom | boolean |
config.isPercent | boolean |
config.value | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatHighlightRuleBuilder
setStrikethrough()
setStrikethrough(isStrikethrough): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:784
Set the strikethrough
Parameters
Parameter | Type |
---|---|
isStrikethrough | boolean |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setUnderline()
setUnderline(isUnderline): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:794
Set the underscore
Parameters
Parameter | Type |
---|---|
isUnderline | boolean |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
setUniqueValues()
setUniqueValues(): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:664
Set uniqueValues rule
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatHighlightRuleBuilder
whenCellEmpty()
whenCellEmpty(): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:801
Sets the conditional formatting rule to fire when the cell is empty.
Returns
ConditionalFormatHighlightRuleBuilder
whenCellNotEmpty()
whenCellNotEmpty(): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:810
Sets the conditional formatting rule to fire when the cell is not empty
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenDate()
whenDate(date): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:820
Highlight when the date is in a time period, custom time is not supported.
Parameters
Parameter | Type |
---|---|
date | CFTimePeriodOperator |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenFormulaSatisfied()
whenFormulaSatisfied(formulaString): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:829
Sets a conditional formatting rule to fire when a given formula evaluates to true.
Parameters
Parameter | Type | Description |
---|---|---|
formulaString | string | formulaString start with’ = ‘ |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberBetween()
whenNumberBetween(start, end): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:839
Sets the conditional formatting rule to fire when a number is between two specified values or equal to one of them.
Parameters
Parameter | Type |
---|---|
start | number |
end | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberEqualTo()
whenNumberEqualTo(value): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:848
Sets the conditional formatting rule to fire when the number equals the given value
Parameters
Parameter | Type |
---|---|
value | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberGreaterThan()
whenNumberGreaterThan(value): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:857
Sets the conditional formatting rule to fire when the number is greater than the given value
Parameters
Parameter | Type |
---|---|
value | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberGreaterThanOrEqualTo()
whenNumberGreaterThanOrEqualTo(value): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:866
Sets a conditional formatting rule to fire when a number is greater than or equal to a given value.
Parameters
Parameter | Type |
---|---|
value | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberLessThan()
whenNumberLessThan(value): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:875
Sets a conditional formatting rule to fire when the number is less than the given value.
Parameters
Parameter | Type |
---|---|
value | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberLessThanOrEqualTo()
whenNumberLessThanOrEqualTo(value): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:884
Sets the conditional formatting rule to fire when the value is less than or equal to the given value.
Parameters
Parameter | Type |
---|---|
value | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberNotBetween()
whenNumberNotBetween(start, end): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:894
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 |
---|---|
start | number |
end | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenNumberNotEqualTo()
whenNumberNotEqualTo(value): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:903
Sets the conditional formatting rule to fire when a number does not equal a given value.
Parameters
Parameter | Type |
---|---|
value | number |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenTextContains()
whenTextContains(text): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:912
Sets the conditional formatting rule to fire when the input contains the given value.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenTextDoesNotContain()
whenTextDoesNotContain(text): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:921
Sets a conditional formatting rule to fire when the input does not contain the given value.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenTextEndsWith()
whenTextEndsWith(text): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:930
Sets a conditional formatting rule to fire when input ends with a specified value.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenTextEqualTo()
whenTextEqualTo(text): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:939
Sets the conditional formatting rule to fire when the input equals the given value.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder
whenTextStartsWith()
whenTextStartsWith(text): ConditionalFormatHighlightRuleBuilder
Defined in: sheets-conditional-formatting/src/facade/conditional-formatting-builder.ts:948
Sets the conditional formatting rule to fire when the input value begins with the given value.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
ConditionalFormatHighlightRuleBuilder
Memberof
ConditionalFormatRuleBuilder