Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

OfficeExtension.UpdateOptions interface

Package:
office

Provides an option for suppressing an error when the object that is used to set multiple properties tries to set read-only properties.

Remarks

Used by

Examples

// 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();
});

Properties

throwOnReadOnly

Throw an error if the passed-in property list includes read-only properties (default = true).

Property Details

throwOnReadOnly

Throw an error if the passed-in property list includes read-only properties (default = true).

throwOnReadOnly?: boolean

Property Value

boolean


Feedback

Was this page helpful?