[]
        
(Showing Draft Content)

GC.Spread.Sheets.ConditionalFormatting.RuleType

Enumeration: RuleType

Sheets.ConditionalFormatting.RuleType

Specifies the rule type.

example

// this example show how to set a rule type for NormalConditionRule.
activeSheet.setArray(0, 0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
activeSheet.setArray(0, 2, [1, 2, 3, 4, 5, 6, 5, 8, 1, 10]);
var greatThan = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
greatThan.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
greatThan.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
greatThan.value1(4);
greatThan.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
greatThan.style(style);
activeSheet.conditionalFormats.addRule(greatThan);
var unique = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
unique.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.uniqueRule);
unique.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
unique.value1(5);
unique.ranges([new GC.Spread.Sheets.Range(0, 2, 10, 1)]);
var style = new GC.Spread.Sheets.Style();
style.backColor = "gold";
unique.style(style);
activeSheet.conditionalFormats.addRule(unique);

Table of contents

Enumeration members

Enumeration members

averageRule

averageRule = 8

Specifies the average rule.


cellValueRule

cellValueRule = 1

Specifies the cell value rule.


columnStateRule

columnStateRule = 15

Specifies the column state rule.


conditionRuleBase

conditionRuleBase = 0

Specifies the base rule of the condition.


dataBarRule

dataBarRule = 12

Specifies the data bar rule.


dateOccurringRule

dateOccurringRule = 4

Specifies the date occurring rule.


duplicateRule

duplicateRule = 7

Specifies the duplicate rule.


formulaRule

formulaRule = 3

Specifies the formula rule.


iconSetRule

iconSetRule = 13

Specifies the icon set rule.


rowStateRule

rowStateRule = 14

Specifies the row state rule.


specificTextRule

specificTextRule = 2

Specifies the specific text rule.


threeScaleRule

threeScaleRule = 11

Specifies the three scale rule.


top10Rule

top10Rule = 5

Specifies the top 10 rule.


twoScaleRule

twoScaleRule = 10

Specifies the two scale rule.


uniqueRule

uniqueRule = 6

Specifies the unique rule.