// 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."]]],[]]