ExcelScript.ProtectionSelectionMode enum
Comentários
Exemplos
/**
* This script protects cells from being selected on the current worksheet.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the protection settings for the current worksheet.
const currentSheet = workbook.getActiveWorksheet();
const sheetProtection = currentSheet.getProtection();
// Create a new WorksheetProtectionOptions object with the selectionMode property set to `none`.
let protectionOptions : ExcelScript.WorksheetProtectionOptions = {
selectionMode: ExcelScript.ProtectionSelectionMode.none
}
// Apply the given protection options.
sheetProtection.protect(protectionOptions);
}
Campos
| none | A seleção não é permitida para células. |
| normal | A seleção é permitida para todas as células. |
| unlocked | A seleção só é permitida para células que não estão bloqueadas. |