Compartir a través de


ExcelScript.AllowEditRangeOptions interface

Interfaz utilizada para construir campos opcionales del AllowEditRange objeto .

Comentarios

Ejemplos

/**
 * This script adds a password-protected, editable range
 * to an otherwise protected worksheet.
 */
function main(workbook: ExcelScript.Workbook, password: string) {
    // Get the protection object for the "Data" worksheet.
    const dataSheet = workbook.getWorksheet("Data");
    const sheetProtection = dataSheet.getProtection();

    // Set the password needed to edit the range to be the user provided string.
    const editRangeProperties : ExcelScript.AllowEditRangeOptions = {
        password: password
    };

    // Set range "D2:D6" to be editable if the password is provided.
    sheetProtection.addAllowEditRange("Notes Section", "D2:D6", editRangeProperties);
    
    // Protect the worksheet.
    sheetProtection.protect();
}

Propiedades

password

Contraseña asociada a AllowEditRange.

Detalles de las propiedades

password

Contraseña asociada a AllowEditRange.

password?: string;

Valor de propiedad

string