Excel.LinkedEntityCellValueLoadedEventArgs interface
Provides information about the LinkedEntityCellValue that was requested given a specified LinkedEntityId.
Remarks
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 |
| id | Gets the |
| linked |
Gets the |
| source | Gets the source of the event. See |
| type | Gets the type of the event. See |
Property Details
error
Any error encountered during the request to load the LinkedEntityCellValue.
error?: string;
Property Value
string
Remarks
id
Gets the LinkedEntityId of the requested LinkedEntityCellValue.
id: LinkedEntityId;
Property Value
Remarks
linkedEntityCellValue
Gets the LinkedEntityCellValue of the requested LinkedEntityId. If the load operation failed, this property is null.
linkedEntityCellValue?: LinkedEntityCellValue;
Property Value
Remarks
source
Gets the source of the event. See Excel.EventSource for details.
source: Excel.EventSource | "Local" | "Remote";
Property Value
Excel.EventSource | "Local" | "Remote"
Remarks
type
Gets the type of the event. See Excel.EventType for details.
type: "LinkedEntityDataDomainLinkedEntityCellValueLoaded";
Property Value
"LinkedEntityDataDomainLinkedEntityCellValueLoaded"