SpreadJS製品ヘルプ
CustomValueType 列挙体
GC.Spread.Sheets.ConditionalFormatting 名前空間 : CustomValueType 列挙体
カスタム値のタイプを指定します。
メンバ
メンバ解説
emptyセル値が空またはnullかどうかを示します。
errorセル値が計算エラーを含むかどうかを示します。
formulaセル値が数式かどうかを示します。
nonEmptyセル値が空またはnullでないかどうかを示します。
nonErrorセル値が計算エラーを含まないかどうかを示します。
使用例
次のサンプルコードは、条件を作成します。
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition, {customValueType: GC.Spread.Sheets.ConditionalFormatting.CustomValueType.formula,
    formula: "A1>0"});
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, -4);
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.CustomValueType.nonEmpty});
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.ignoreBlank(false);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition);
nCondition.customValueType(GC.Spread.Sheets.ConditionalFormatting.CustomValueType.formula);
nCondition.formula("A1>0");
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, -4);
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition, {customValueType: GC.Spread.Sheets.ConditionalFormatting.CustomValueType.formula,
    formula: "A1>0"});
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, -4);
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.CustomValueType.nonEmpty});
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.ignoreBlank(false);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.formulaCondition);
nCondition.customValueType(GC.Spread.Sheets.ConditionalFormatting.CustomValueType.formula);
nCondition.formula("A1>0");
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, -4);
継承階層

Object
   GC.Spread.Sheets.ConditionalFormatting.CustomValueType

関連トピック

参照

GC.Spread.Sheets.ConditionalFormatting 名前空間