本帖最后由 爱心觉罗晓宇 于 2023-10-25 19:22 编辑
代码 var sheet = this.spread.getActiveSheet();
let option = {
allowSelectLockedCells: false,
allowSelectUnlockedCells: false,
allowFilter: false,
allowSort: false,
allowResizeRows: false,
allowResizeColumns: false,
allowEditObjects: false,
allowDragInsertRows: false,
allowDragInsertColumns: false,
allowInsertRows: false,
allowInsertColumns: false,
allowDeleteRows: false,
allowDeleteColumns: false
};
sheet.options.protectionOptions = option;
sheet.options.isProtected = true;
sheet.clearSelection();
console.log(sheet.options, '11111111111')
}
|