const spread = this.getSpread();
const { col, compareSymbol, threshold, row } = params;
const activeSheet = spread.getActiveSheet();
// 无效数据 设置背景色
const cfs = activeSheet.conditionalFormats;
let style = new GC.Spread.Sheets.Style();
style.backColor = '#FBD4D8';
let operator = GC.Spread.Sheets.RowColumnStates.invalid;
let ranges = [new GC.Spread.Sheets.Range(row, col, 1, 1)];
cfs.addColumnStateRule(operator, style, ranges);
let dv = GC.Spread.Sheets.DataValidation.createFormulaValidator(`CustomerCondition("${compareSymbol},${threshold}")`); // 创建公式验证器
activeSheet.setDataValidator(-1, col, dv, GC.Spread.Sheets.SheetArea.viewport);
如何知道哪些单元格校验通过,哪些单元格未校验通过?
|
|