ExcelScript.ProtectionSelectionMode enum
Hinweise
Beispiele
/**
* 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);
}
Felder
none | Die Auswahl ist für keine Zellen zulässig. |
normal | Die Auswahl ist für alle Zellen zulässig. |
unlocked | Die Auswahl ist nur für Zellen zulässig, die nicht gesperrt sind. |