Protect Worksheet in Office Scripts with Options
问题 How can I protect a worksheet but allow the user to format the columns in Office Scripts? I have tried a few things but haven't had any success. function main(workbook: ExcelScript.Workbook) { let sheet = workbook.getWorksheet("By Item"); sheet.getProtection().protect(ExcelScript.WorksheetProtectionOptions.allowFormatColumns); } Please see the attached link https://docs.microsoft.com/en-us/javascript/api/office-scripts/excelscript/excelscript.worksheetprotection?view=office-scripts#protect