1、整个表格设置锁定:
var defaultStyle = sheet.getDefaultStyle();
defaultStyle.locked = true;
sheet.setIsProtected(true);
sheet.setDefaultStyle(defaultStyle);
2、整列设置锁定:
var style1 = new GcSpread.Sheets.Style();
style1.locked = false;
sheet.setStyle(-1, col, style1); |
|