[]
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);
• averageRule = 8
Specifies the average rule.
• cellValueRule = 1
Specifies the cell value rule.
• columnStateRule = 15
Specifies the column state rule.
• conditionRuleBase = 0
Specifies the base rule of the condition.
• dataBarRule = 12
Specifies the data bar rule.
• dateOccurringRule = 4
Specifies the date occurring rule.
• duplicateRule = 7
Specifies the duplicate rule.
• formulaRule = 3
Specifies the formula rule.
• iconSetRule = 13
Specifies the icon set rule.
• rowStateRule = 14
Specifies the row state rule.
• specificTextRule = 2
Specifies the specific text rule.
• threeScaleRule = 11
Specifies the three scale rule.
• top10Rule = 5
Specifies the top 10 rule.
• twoScaleRule = 10
Specifies the two scale rule.
• uniqueRule = 6
Specifies the unique rule.