// 次のサンプルコードは、複数のルールを作成します。 activeSheet.setArray(0,0,[[1,10],[2,9], [3,8],[4,7],[5,6],[6,5],[7,4],[8,3],[9,2],[10,1]]); var style = new GC.Spread.Sheets.Style(); style.backColor = "red"; style.foreColor = "black"; var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(); cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule); cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan); cell.value1("=B1"); cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]); cell.style(style); activeSheet.conditionalFormats.addRule(cell); var style1 = new GC.Spread.Sheets.Style(); style1.foreColor = "red"; var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(); top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule); top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top); top.rank(3); top.style(style1); top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]); top.stopIfTrue(true); activeSheet.conditionalFormats.addRule(top); var formulaOfTheTopLeftCell = cell.value1(); var formulaOfA5 = cell.value1(4, 0); var formulaOfA10 = cell.value1(9, 0);