可以对选中区域内的单元格设置数据验证,验证单元格内数据长度,长度可自定义,示例:
- var dv = GC.Spread.Sheets.DataValidation.createTextLengthValidator(
- GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan,
- "0",
- "20"
- );
-
- dv.ignoreBlank(false);
- spread.options.highlightInvalidData = true;
- sheet.setDataValidator(
- row,
- col,
- dv,
- GC.Spread.Sheets.SheetArea.viewport
- );
复制代码
|