OfficeExtension.UpdateOptions interface
Fornece uma opção para suprimir um erro quando o objeto utilizado para definir várias propriedades tenta definir propriedades só de leitura.
Comentários
Exemplos
// 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();
});
Propriedades
| throw |
Gerar um erro se a lista de propriedades transmitidas incluir propriedades só de leitura (predefinição = verdadeiro). |
Detalhes da propriedade
throwOnReadOnly
Gerar um erro se a lista de propriedades transmitidas incluir propriedades só de leitura (predefinição = verdadeiro).
throwOnReadOnly?: boolean
Valor da propriedade
boolean