[]
Sheets.ConditionalFormatting.NormalConditionRule
↳ NormalConditionRule
• new NormalConditionRule(ruleType, ranges, style, operator, value1, value2, text, formula, type, rank)
通常の条件ルールを表します。
実例
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
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(5);
cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
cell.style(style);
activeSheet.conditionalFormats.addRule(cell);
// ボタン
$("#button1").click(function () {
cell.reset();
activeSheet.suspendPaint();
activeSheet.resumePaint();
});
| 名前 | 型 | 説明 |
|---|---|---|
ruleType |
RuleType |
条件付き書式ルールのタイプ。 |
ranges |
Range[] |
ルールが適用されるセル範囲。配列要素の型はGC.Spread.Sheets.Rangeです。 |
style |
Style |
条件が満たされた場合にセルに適用されるスタイル。 |
operator |
LogicalOperators | ComparisonOperators | TextComparisonOperators |
比較演算子。 |
value1 |
Object |
最初の値。 |
value2 |
Object |
2番目の値。 |
text |
string |
比較用の文字列。 |
formula |
string |
条件数式。 |
type |
AverageConditionType | DateOccurringType | Top10ConditionType |
平均との比較条件タイプ。 |
rank |
number |
スタイルを適用する上位または下位項目の数。 |
▸ condition(value?): any
ルールのベース条件を取得または設定します。
| 名前 | 型 | 説明 |
|---|---|---|
value? |
Condition |
ルールのベース条件。 |
any
値が設定されていない場合は、ルールのベース条件を返します。値が設定されている場合は、条件ルールを返します。
▸ contains(row, column): boolean
セル範囲に指定した行と列のセルが含まれているかどうかを判定します。
| 名前 | 型 | 説明 |
|---|---|---|
row |
number |
行インデックス。 |
column |
number |
列インデックス。 |
boolean
指定した行と列にあるセルがセル範囲に含まれている場合はtrue、それ以外の場合はfalse。
▸ createCondition(): Condition
ルールの条件を作成します。
実例
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.formulaRule);
rule.formula("=A1=B1+C1");
var condition = rule.createCondition();
console.log(condition.evaluate(activeSheet));
条件。
ConditionRuleBase.createCondition
▸ evaluate(evaluator, baseRow, baseColumn, actual): Style
セルが条件を満たす場合、ルールのセルスタイルを返します。
実例
activeSheet.setValue(0, 0, 1, 3);
activeSheet.setValue(1, 0, 15, 3);
activeSheet.setValue(2, 0, 25, 3);
activeSheet.setValue(3, 0, -1, 3);
var iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule();
iconSetRule.ranges([new GC.Spread.Sheets.Range(0, 0, 4, 1)]);
iconSetRule.iconSetType(GC.Spread.Sheets.ConditionalFormatting.IconSetType.fourTrafficLights);
activeSheet.conditionalFormats.addRule(iconSetRule);
for (var i = 1; i < 5; i++) {
var evaluateResult = iconSetRule.evaluate(activeSheet, i, 0, activeSheet.getValue(i, 0));
console.log(evaluateResult);
}
| 名前 | 型 | 説明 |
|---|---|---|
evaluator |
Object |
条件を評価できるオブジェクト。 |
baseRow |
number |
行インデックス。 |
baseColumn |
number |
列インデックス。 |
actual |
Object |
実際の値。 |
ルールのセルスタイル。
▸ formula(formulaOrBaseRow?, baseColumn?): any
条件数式を取得または設定します。
実例
// 次のサンプルコードは、formulaメソッドを使用します。
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.formulaRule);
rule.formula("=A1=B1+C1");
rule.ranges([new GC.Spread.Sheets.Range(0, 0, 2, 1)]);
rule.style(style);
activeSheet.conditionalFormats.addRule(rule);
activeSheet.setValue(0, 0, 2.3);
activeSheet.setValue(0, 1, 1.3);
activeSheet.setValue(0, 2,1,3);
activeSheet.setValue(1, 0, 1.3);
var formulaOfTheTopLeftCell = rule.formula();
var formulaOfA1 = rule.formula(0, 0);
var formulaOfA2 = rule.formula(1, 0);
| 名前 | 型 | 説明 |
|---|---|---|
formulaOrBaseRow? |
string | number |
条件数式または基本行。 |
baseColumn? |
number |
基本列。 |
any
値が設定されていない場合、またはbaseRowとbaseColumnが設定されている場合は、条件数式を返します。それ以外の場合は、数値条件ルールを返します。
▸ getExpected(): Style
ベースルールのスタイルを取得します。
実例
// 次のサンプルコードは、getExpected メソッドを使用します。
activeSheet.suspendPaint();
var style = new GC.Spread.Sheets.Style();
style.backColor = "green";
var ranges = [new GC.Spread.Sheets.Range(0, 0, 10, 1)];
activeSheet.conditionalFormats.addUniqueRule(style, ranges);
var data = [50, 50, 11, 5, 3, 6, 7, 8, 7, 11];
var condition = activeSheet.conditionalFormats.getRules()[0];
for (var i = 0; i < 10;i++){
activeSheet.setValue(i, 0, data[i]);
}
activeSheet.resumePaint();
console.log(condition.getExpected());
▸ intersects(row, column, rowCount, columnCount): boolean
このルールの範囲が別の範囲と交差するかどうかを指定します。
実例
// 次のサンプルコードは、intersects メソッドを使用します。
activeSheet.suspendPaint();
var style = new GC.Spread.Sheets.Style();
style.backColor = "green";
var ranges = [new GC.Spread.Sheets.Range(0, 0, 10, 1)];
activeSheet.conditionalFormats.addUniqueRule(style, ranges);
var data = [50, 50, 11, 5, 3, 6, 7, 8, 7, 11];
var condition = activeSheet.conditionalFormats.getRules()[0];
for (var i = 0; i < 10; i++) {
activeSheet.setValue(i, 0, data[i]);
}
activeSheet.resumePaint();
activeSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, function(e, info) {
var selection = info.newSelections[0];
var result = condition.intersects(selection.row, selection.col, selection.rowCount, selection.colCount);
if (result) {
alert("current selection is intersects with condition formatting range");
} else {
alert("current selection is not intersects with condition formatting range");
}
});
| 名前 | 型 | 説明 |
|---|---|---|
row |
number |
行インデックス。 |
column |
number |
列インデックス。 |
rowCount |
number |
行数。 |
columnCount |
number |
列数。 |
boolean
このルールの範囲が別の範囲と交差する場合はtrue、それ以外の場合はfalse。
▸ isScaleRule(): boolean
このルールがスケールルールかどうかを指定します。
boolean
このルールがスケールルールである場合はtrue、それ以外の場合はfalse。
▸ operator(value?): any
比較演算子を取得または設定します。
実例
// 次のサンプルコードは、複数のルールを作成します。
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
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(5);
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);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
ComparisonOperators |
比較演算子。 |
any
値が設定されていない場合は、比較演算子を返します。値が設定されている場合は、数値条件ルールを返します。
▸ priority(value?): any
ルールの優先度を取得または設定します。
実例
// 例: 優先順位が異なる複数のルールを作成します。
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
rule.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
rule.value1(10);
rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
rule.style(style);
rule.priority(1); // 優先度を1(最高優先度)に設定します。
activeSheet.conditionalFormats.addRule(rule);
var style2 = new GC.Spread.Sheets.Style();
style2.backColor = "blue";
var rule2 = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule2.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
rule2.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
rule2.value1(100);
rule2.ranges([new GC.Spread.Sheets.Range(5, 0, 10, 1)]);
rule2.style(style2);
rule2.priority(2); // 優先度を2に設定します。
activeSheet.conditionalFormats.addRule(rule2);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
number |
ルールの優先度。 |
any
値が設定されていない場合は、ルールの優先度を返します。値が設定されている場合は、条件ルールを返します。
▸ ranges(value?): any
条件ルールの範囲を取得または設定します。
実例
var style = new GC.Spread.Sheets.Style();
style.backColor = "green";
var ranges = [new GC.Spread.Sheets.Range(0, 0, 10, 1)];
activeSheet.conditionalFormats.addUniqueRule(style, ranges);
activeSheet.setValue(0, 0, 50);
activeSheet.setValue(1, 0, 50);
activeSheet.setValue(2, 0, 11);
activeSheet.setValue(3, 0, 5);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
Range[] |
条件ルールの範囲。 |
any
値が設定されていない場合は、条件ルールの範囲のコピーを返します。値が設定されている場合は、条件ルールを返します。
▸ rank(value?): any
スタイルを適用する上位または下位項目の数を取得または設定します。
実例
// 次のサンプルコードは、複数のルールを作成します。
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
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(5);
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);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
number |
スタイルを適用する上位または下位項目の数。 |
any
値が設定されていない場合は、スタイルを適用する上位または下位項目の数を返します。値が設定されている場合は、数値条件ルールを返します。
▸ reset(): void
ルールをリセットします。
実例
activeSheet.setValue(0,0, 1,3);
activeSheet.setValue(1,0, 50,3);
activeSheet.setValue(2,0, 100,3);
activeSheet.setValue(3,0, 2,3);
activeSheet.setValue(4,0, 60,3);
activeSheet.setValue(5,0, 90,3);
activeSheet.setValue(6,0, 3,3);
activeSheet.setValue(7,0, 40,3);
activeSheet.setValue(8,0, 70,3);
activeSheet.setValue(9,0, 5,3);
activeSheet.setValue(10,0, 35,3);
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
style.borderLeft =new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderTop = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderRight = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
style.borderBottom = new GC.Spread.Sheets.LineBorder("blue",GC.Spread.Sheets.LineStyle.medium);
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.averageRule);
rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 3)]);
rule.style(style);
rule.type(GC.Spread.Sheets.ConditionalFormatting.AverageConditionType.above);
activeSheet.conditionalFormats.addRule(rule);
rule.reset();
void
▸ ruleType(value?): any
条件ルールのタイプを取得または設定します。
実例
// 次のサンプルコードは、ruleTypeメソッドを使用します。
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
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(5);
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);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
RuleType |
条件ルールのタイプ。 |
any
値が設定されていない場合は、条件ルールのタイプを返します。値が設定されている場合は、条件ルールを返します。
▸ stopIfTrue(value?): any
より優先度の低いルールがこのルールの前に適用されるかどうかを取得または設定します。
実例
// 次のサンプルコードは、複数のルールを適用します。
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
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(5);
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);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
boolean |
より優先度の低いルールがこのルールの前に適用されるかどうか。 |
any
値が設定されていない場合は、より優先度の低いルールがこのルールの前に適用されるかどうかを返します。値が設定されている場合は、条件ルールを返します。
▸ style(value?): any
ルールのスタイルを取得または設定します。
実例
// 次のサンプルコードは、複数のルールを適用します。
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
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(5);
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);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
Style |
ルールのスタイル。 |
any
値が設定されていない場合は、ルールのスタイルを返します。値が設定されている場合は、条件ルールを返します。
▸ text(value?): any
比較用の文字列を取得または設定します。
実例
// 次のサンプルコードは、ルールを作成します。
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
rule.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.specificTextRule);
rule.style(style);
rule.text("test");
rule.operator(GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators.contains);
rule.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
activeSheet.conditionalFormats.addRule(rule);
activeSheet.setValue(0, 0, "testing");
activeSheet.setValue(1, 0, "test");
activeSheet.setValue(2, 0, "a");
activeSheet.setValue(3, 0, "t");
| 名前 | 型 | 説明 |
|---|---|---|
value? |
string |
比較用の文字列。 |
any
値が設定されていない場合は、比較用の文字列を返します。値が設定されている場合は、数値条件ルールを返します。
▸ type(value?): any
平均との比較条件タイプを取得または設定します。
実例
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
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(5);
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);
| 名前 | 型 | 説明 |
|---|---|---|
value? |
AverageConditionType |
平均との比較条件タイプ。 |
any
値が設定されていない場合は、平均との比較条件タイプを返します。値が設定されている場合は、数値条件ルールを返します。
▸ value1(valueOrBaseRow?, baseColumn?): any
最初の値を取得または設定します。
実例
// 次のサンプルコードは、複数のルールを作成します。
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);
| 名前 | 型 | 説明 |
|---|---|---|
valueOrBaseRow? |
any |
最初の値または基本行。 |
baseColumn? |
number |
基本列。 |
any
値が設定されていない場合、またはbaseRowとbaseColumnが設定されている場合は、最初の値を返します。それ以外の場合は、数値条件ルールを返します。
▸ value2(valueOrBaseRow?, baseColumn?): any
最初の値を取得または設定します。
実例
// 次のサンプルコードは、value2メソッドを使用します。
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between);
cell.value1(5);
cell.value2(7);
cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
style.foreColor = "black";
cell.style(style);
activeSheet.conditionalFormats.addRule(cell);
| 名前 | 型 | 説明 |
|---|---|---|
valueOrBaseRow? |
any |
最初の値または基本行。 |
baseColumn? |
number |
基本列。 |
any
値が設定されていない場合、またはbaseRowとbaseColumnが設定されている場合は、最初の値を返します。それ以外の場合は、数値条件ルールを返します。