Excel.LinkedEntityCellValueLoadedEventArgs interface

指定したLinkedEntityIdによって要求されたLinkedEntityCellValueに関する情報を提供します。

注釈

API セット: ExcelApi 1.21

使用元

// Registers an event handler for the onLinkedEntityCellValueLoaded event.
async function registerEvent() {
    await Excel.run(async (context) => {
        const linkedEntityDataDomains: Excel.LinkedEntityDataDomainCollection = context.workbook.linkedEntityDataDomains;
        linkedEntityDataDomains.onLinkedEntityCellValueLoaded.add(handleLoadedLinkedEntity);

        await context.sync();
        console.log("Event handler registered successfully. You''ll be notified when linked entities are loaded.");
    });
}

// Handles the onLinkedEntityCellValueLoaded event that occurs when a linked entity cell value is loaded.
async function handleLoadedLinkedEntity(event: Excel.LinkedEntityCellValueLoadedEventArgs) {
    await Excel.run(async (context) => {
        console.log(`The ${event.type} event occurred from a ${event.source} source.`);
        console.log(`The linked entity cell value with ID ${event.id} is loaded.`);
        const loadedLinkedEntityCellValue: Excel.LinkedEntityCellValue = event.linkedEntityCellValue;
        console.log(`Loaded linked entity cell value: ${loadedLinkedEntityCellValue}`);

        // Queue operations on the loaded entity value here.

        await context.sync();
    });
}

プロパティ

error

LinkedEntityCellValue を読み込む要求中に発生したエラー。

id

要求されたLinkedEntityCellValueLinkedEntityIdを取得します。

linkedEntityCellValue

要求されたLinkedEntityIdLinkedEntityCellValueを取得します。 読み込み操作に失敗した場合、このプロパティは null

source

イベントのソースを取得します。 詳細は「Excel.EventSource」をご覧ください。

type

イベントの種類を取得します。 詳細は「Excel.EventType」をご覧ください。

プロパティの詳細

error

LinkedEntityCellValue を読み込む要求中に発生したエラー。

error?: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.21

id

要求されたLinkedEntityCellValueLinkedEntityIdを取得します。

id: LinkedEntityId;

プロパティ値

注釈

API セット: ExcelApi 1.21

linkedEntityCellValue

要求されたLinkedEntityIdLinkedEntityCellValueを取得します。 読み込み操作に失敗した場合、このプロパティは null

linkedEntityCellValue?: LinkedEntityCellValue;

プロパティ値

注釈

API セット: ExcelApi 1.21

source

イベントのソースを取得します。 詳細は「Excel.EventSource」をご覧ください。

source: Excel.EventSource | "Local" | "Remote";

プロパティ値

Excel.EventSource | "Local" | "Remote"

注釈

API セット: ExcelApi 1.21

type

イベントの種類を取得します。 詳細は「Excel.EventType」をご覧ください。

type: "LinkedEntityDataDomainLinkedEntityCellValueLoaded";

プロパティ値

"LinkedEntityDataDomainLinkedEntityCellValueLoaded"

注釈

API セット: ExcelApi 1.21