Compartir a través de


OfficeExtension.UpdateOptions interface

Proporciona una opción para suprimir un error cuando el objeto que se usa para establecer varias propiedades intenta establecer propiedades de solo lectura.

Comentarios

Ejemplos

// Update a range in an Excel worksheet using the RangeUpdateData interface.
await Excel.run(async (context) => {
    const sheet = context.workbook.worksheets.getItem("Sample");
    const range = sheet.getRange("B2:E2");

    // Configure the set operation to still run if a readonly property is included.
    // All settable properties will be updated.
    const options: OfficeExtension.UpdateOptions = {throwOnReadOnly: false};

    // Set the range with some data from another source (`updateData` is set elsewhere).
    range.set(updateData, options);
    await context.sync();
});

Propiedades

throwOnReadOnly

Se produce un error si la lista de propiedades pasadas incluye propiedades de solo lectura (valor predeterminado = true).

Detalles de las propiedades

throwOnReadOnly

Se produce un error si la lista de propiedades pasadas incluye propiedades de solo lectura (valor predeterminado = true).

throwOnReadOnly?: boolean

Valor de propiedad

boolean