Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
JenisPerlindungan
Enumerasi yang mewakili bagian spreadsheet yang dapat dilindungi dari pengeditan.
Untuk memanggil enum, Anda memanggil class induk, nama, dan propertinya. Misalnya,
SpreadsheetApp.ProtectionType.RANGE.
// 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();}
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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."]]],[]]