[]
        
(Showing Draft Content)

GC.Spread.Sheets.ConditionalFormatting.RuleType

枚举: RuleType

Sheets.ConditionalFormatting.RuleType

规则类型 代码示例

// 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

枚举值成员

枚举值成员

averageRule

averageRule = 8

平均规则


cellValueRule

cellValueRule = 1

单元格值规则


columnStateRule

columnStateRule = 15

列状态规则


conditionRuleBase

conditionRuleBase = 0

条件的基本规则


dataBarRule

dataBarRule = 12

数据条规则


dateOccurringRule

dateOccurringRule = 4

日期发生的规则


duplicateRule

duplicateRule = 7

重复规则


formulaRule

formulaRule = 3

公式规则


iconSetRule

iconSetRule = 13

图标集规则


rowStateRule

rowStateRule = 14

行状态规则


specificTextRule

specificTextRule = 2

特定的文本规则


threeScaleRule

threeScaleRule = 11

三色刻度规则


top10Rule

top10Rule = 5

前10条规则


twoScaleRule

twoScaleRule = 10

双色刻度规则


uniqueRule

uniqueRule = 6

唯一规则