SpreadJS製品ヘルプ
value2 メソッド
GC.Spread.Sheets.ConditionalFormatting 名前空間 > NormalConditionRule クラス : value2 メソッド
最初の値または基本行。
基本列。
最初の値を取得または設定します。
シンタックス
var instance = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(ruleType, ranges, style, operator, value1, value2, text, formula, type, rank);
var value; // Type: any
value = instance.value2(valueOrBaseRow, baseColumn);
function value2( 
   valueOrBaseRow : undefined,
   baseColumn : number
) : any;

パラメータ

valueOrBaseRow
最初の値または基本行。
baseColumn
基本列。

戻り値の型

値が設定されていない場合、またはbaseRowとbaseColumnが設定されている場合は、最初の値を返します。それ以外の場合は、数値条件ルールを返します。
使用例
次のサンプルコードは、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);
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);
関連トピック

参照

NormalConditionRule クラス