// Remove all range protections in the spreadsheet that the user has permission// to edit.constss=SpreadsheetApp.getActive();constprotections=ss.getProtections(SpreadsheetApp.ProtectionType.RANGE);for(constprotectionofprotections){if(protection.canEdit()){protection.remove();}}
// Removes sheet protection from the active sheet, if the user has permission to// edit it.constsheet=SpreadsheetApp.getActiveSheet();constprotection=sheet.getProtections(SpreadsheetApp.ProtectionType.SHEET)[0];if(protection?.canEdit()){protection.remove();}
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-12-22 UTC"],[[["`ProtectionType` is an enum used to specify whether you are working with sheet or range protection in Google Apps Script."],["It has two properties: `SHEET` and `RANGE`, that are used with the `getProtections()` method to retrieve the corresponding protections."],["You can use `ProtectionType` to remove or modify existing protections within your spreadsheet, given the necessary permissions."]]],[]]