SpreadJS,V9版本。
在对一个单元格如下代码设置条件格式时,如何避免单元格为空时也标红?
- var style = new GcSpread.Sheets.Style();
- style.backColor = "red";
- operator = form.operator2ValueRule();
- var newRule = new GcSpread.Sheets.CellValueRule(GcSpread.Sheets.ComparisonOperator[operator],
- isNaN(minDv) ? minValue : minDv,
- isNaN(maxDv) ? maxValue : maxDv,
- style);
- newRule.ranges = sels;
- var res = sheet.getConditionalFormats().addRule(newRule);
复制代码
|
|