Excel.LinkedEntityCellValueLoadedEventArgs interface

Stellt Informationen zu dem bereit, das LinkedEntityCellValue bei einem angegebenen LinkedEntityIdangefordert wurde.

Hinweise

API-Satz: ExcelApi 1.21

Verwendet von

Beispiele

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

Eigenschaften

error

Fehler, die während der Anforderung zum Laden des LinkedEntityCellValueaufgetreten sind.

id

Ruft die des LinkedEntityId angeforderten LinkedEntityCellValueab.

linkedEntityCellValue

Ruft die des LinkedEntityCellValue angeforderten LinkedEntityIdab. Wenn beim Ladevorgang ein Fehler aufgetreten ist, ist nulldiese Eigenschaft .

source

Ruft die Quelle des Ereignisses ab. Weitere Informationen finden Sie unter Excel.EventSource .

type

Ruft den Typ des Ereignisses ab. Weitere Informationen finden Sie unter Excel.EventType .

Details zur Eigenschaft

error

Fehler, die während der Anforderung zum Laden des LinkedEntityCellValueaufgetreten sind.

error?: string;

Eigenschaftswert

string

Hinweise

API-Satz: ExcelApi 1.21

id

Ruft die des LinkedEntityId angeforderten LinkedEntityCellValueab.

id: LinkedEntityId;

Eigenschaftswert

Hinweise

API-Satz: ExcelApi 1.21

linkedEntityCellValue

Ruft die des LinkedEntityCellValue angeforderten LinkedEntityIdab. Wenn beim Ladevorgang ein Fehler aufgetreten ist, ist nulldiese Eigenschaft .

linkedEntityCellValue?: LinkedEntityCellValue;

Eigenschaftswert

Hinweise

API-Satz: ExcelApi 1.21

source

Ruft die Quelle des Ereignisses ab. Weitere Informationen finden Sie unter Excel.EventSource .

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

Eigenschaftswert

Excel.EventSource | "Local" | "Remote"

Hinweise

API-Satz: ExcelApi 1.21

type

Ruft den Typ des Ereignisses ab. Weitere Informationen finden Sie unter Excel.EventType .

type: "LinkedEntityDataDomainLinkedEntityCellValueLoaded";

Eigenschaftswert

"LinkedEntityDataDomainLinkedEntityCellValueLoaded"

Hinweise

API-Satz: ExcelApi 1.21