OfficeExtension.UpdateOptions interface

複数のプロパティの設定に使用されるオブジェクトが読み取り専用プロパティを設定しようとしたときにエラーを抑制するオプションを提供します。

注釈

使用元

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

プロパティ

throwOnReadOnly

渡されたプロパティの一覧に読み取り専用プロパティが含まれている場合は、エラーをスローします (既定値 = true)。

プロパティの詳細

throwOnReadOnly

渡されたプロパティの一覧に読み取り専用プロパティが含まれている場合は、エラーをスローします (既定値 = true)。

throwOnReadOnly?: boolean

プロパティ値

boolean