Edit

Excel.LinkedEntityCellValueLoadedEventArgs interface

Provides information about the LinkedEntityCellValue that was requested given a specified LinkedEntityId.

Remarks

API set: ExcelApi 1.21

Used by

Examples

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

Properties

error

Any error encountered during the request to load the LinkedEntityCellValue.

id

Gets the LinkedEntityId of the requested LinkedEntityCellValue.

linkedEntityCellValue

Gets the LinkedEntityCellValue of the requested LinkedEntityId. If the load operation failed, this property is null.

source

Gets the source of the event. See Excel.EventSource for details.

type

Gets the type of the event. See Excel.EventType for details.

Property Details

error

Any error encountered during the request to load the LinkedEntityCellValue.

error?: string;

Property Value

string

Remarks

API set: ExcelApi 1.21

id

Gets the LinkedEntityId of the requested LinkedEntityCellValue.

id: LinkedEntityId;

Property Value

Remarks

API set: ExcelApi 1.21

linkedEntityCellValue

Gets the LinkedEntityCellValue of the requested LinkedEntityId. If the load operation failed, this property is null.

linkedEntityCellValue?: LinkedEntityCellValue;

Property Value

Remarks

API set: ExcelApi 1.21

source

Gets the source of the event. See Excel.EventSource for details.

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

Property Value

Excel.EventSource | "Local" | "Remote"

Remarks

API set: ExcelApi 1.21

type

Gets the type of the event. See Excel.EventType for details.

type: "LinkedEntityDataDomainLinkedEntityCellValueLoaded";

Property Value

"LinkedEntityDataDomainLinkedEntityCellValueLoaded"

Remarks

API set: ExcelApi 1.21