本帖最后由 yinuo 于 2021-10-18 15:22 编辑
let sheet = spread.getActiveSheet();
let style = new GC.Spread.Sheets.Style();
style.locked = true;
style.cellPadding = '1 10 1 10';
sheet.setDefaultStyle(style, GC.Spread.Sheets.SheetArea.viewport);
sheet.options.protectionOptions = {
allowSelectLockedCells: true,
allowFilter: true,
allowSort: false,
allowResizeColumns:true,
allowResizeRows:true,
allowInsertRows: false,
allowInsertColumns: false,
allowDeleteRows: false,
allowDeleteColumns: false,
allowEditObjects: true
};
sheet.options.isProtected = true;
// 行列冻结
sheet.frozenRowCount(2);
sheet.frozenColumnCount(7);
DataCache.getInstance().add('sheet', sheet);
|
|