Compartir a través de


ExcelScript.ProtectionSelectionMode enum

Comentarios

Ejemplos

/**
 * 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

No se permite la selección para ninguna celda.

normal

Se permite la selección para todas las celdas.

unlocked

La selección solo se permite para las celdas que no están bloqueadas.