Excel.LinkedEntityCellValueLoadedEventArgs interface

Fornece informações sobre o LinkedEntityCellValue que foi pedido tendo em conta um especificado LinkedEntityId.

Comentários

Conjunto de API: ExcelApi 1.21

Usada por

Exemplos

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

Propriedades

error

Qualquer erro encontrado durante o pedido para carregar o LinkedEntityCellValue.

id

Obtém o LinkedEntityId do pedido LinkedEntityCellValue.

linkedEntityCellValue

Obtém o LinkedEntityCellValue do pedido LinkedEntityId. Se a operação de carga tiver falhado, esta propriedade será null.

source

Obtém a origem do evento. Veja Excel.EventSource para obter detalhes.

type

Obtém o tipo do evento. Veja Excel.EventType para obter detalhes.

Detalhes da propriedade

error

Qualquer erro encontrado durante o pedido para carregar o LinkedEntityCellValue.

error?: string;

Valor da propriedade

string

Comentários

Conjunto de API: ExcelApi 1.21

id

Obtém o LinkedEntityId do pedido LinkedEntityCellValue.

id: LinkedEntityId;

Valor da propriedade

Comentários

Conjunto de API: ExcelApi 1.21

linkedEntityCellValue

Obtém o LinkedEntityCellValue do pedido LinkedEntityId. Se a operação de carga tiver falhado, esta propriedade será null.

linkedEntityCellValue?: LinkedEntityCellValue;

Valor da propriedade

Comentários

Conjunto de API: ExcelApi 1.21

source

Obtém a origem do evento. Veja Excel.EventSource para obter detalhes.

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

Valor da propriedade

Excel.EventSource | "Local" | "Remote"

Comentários

Conjunto de API: ExcelApi 1.21

type

Obtém o tipo do evento. Veja Excel.EventType para obter detalhes.

type: "LinkedEntityDataDomainLinkedEntityCellValueLoaded";

Valor da propriedade

"LinkedEntityDataDomainLinkedEntityCellValueLoaded"

Comentários

Conjunto de API: ExcelApi 1.21