让B1显示信息的意思是B1单元格里显示内容?还是有什么操作?
另外 createTextLengthValidator 的用法是。
- spread.highlightInvalidData(true);
- var dv = GcSpread.Sheets.DefaultDataValidator.createTextLengthValidator(GcSpread.Sheets.ComparisonOperator.GreaterThan, "4", "20");
- dv.showInputMessage = true;
- dv.inputMessage = "Number of characters must be greater than 4.";
- dv.inputTitle = "tip";
- activeSheet.setDataValidator(1, 1, dv)
复制代码
您应该是想用公式验证createFormulaValidator
spread.highlightInvalidData(true);
//The formula validator is valid if the formula condition returns true.
var dv = GcSpread.Sheets.DefaultDataValidator.createFormulaValidator("A1>0");
dv.showInputMessage = true;
dv.inputMessage = "Enter a value greater than 0 in A1.";
dv.inputTitle = "Tip";
activeSheet.setDataValidator(0, 0, dv); |