本帖最后由 Lynn.Dou 于 2022-11-22 09:44 编辑
您好,
您是想通过条件格式来控制单元格的lcoked值吗?
可以参考以下代码:
- var cfs = sheet.conditionalFormats ;
- var style = new GC.Spread.Sheets.Style();
- style.backColor = '#CCFFCC';
- style.locked = false;
- var cvRule = cfs.addCellValueRule(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan, 5, 0, style, [new GC.Spread.Sheets.Range(0, 0, 3, 3)]);
- sheet.options.isProtected = true;
复制代码
|