spread.options.highlightInvalidData = true; // この数式バリデーターは、数式条件がtrueを返す場合、有効になります。 var dv = GC.Spread.Sheets.DataValidation.createFormulaValidator("A1>0"); dv.showInputMessage(true); dv.inputMessage("Enter a value greater than 0 in A1."); dv.inputTitle("Tip"); dv.showErrorMessage(true); dv.errorMessage("Incorrect Value"); activeSheet.setDataValidator(0, 0, 1, 1, dv, GC.Spread.Sheets.SheetArea.viewport); // 連結 activeSheet.bind(GC.Spread.Sheets.Events.ValidationError, function (sender, args) { if (args.validator.showErrorMessage()) { if (confirm(args.validator.errorMessage())) { args.validationResult = GC.Spread.Sheets.DataValidation.DataValidationResult.retry; } else { args.validationResult = GC.Spread.Sheets.DataValidation.DataValidationResult.forceApply; } } });