Excel.LinkedEntityCellValueLoadedEventArgs interface
Fournit des informations sur le LinkedEntityCellValue qui a été demandé en fonction d’un spécifié LinkedEntityId.
Remarques
Ensemble d’API : ExcelApi 1.21
Utilisateur
Exemples
// 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();
});
}
Propriétés
| error | Toute erreur rencontrée lors de la demande de chargement du |
| id | Obtient le |
| linked |
Obtient le |
| source | Obtient la source de l’événement. Pour plus d’informations, consultez |
| type | Obtient le type de l’événement. Pour plus d’informations, consultez |
Détails de la propriété
error
Toute erreur rencontrée lors de la demande de chargement du LinkedEntityCellValue.
error?: string;
Valeur de propriété
string
Remarques
id
Obtient le LinkedEntityId du demandé LinkedEntityCellValue.
id: LinkedEntityId;
Valeur de propriété
Remarques
linkedEntityCellValue
Obtient le LinkedEntityCellValue du demandé LinkedEntityId. Si l’opération de chargement a échoué, cette propriété est null.
linkedEntityCellValue?: LinkedEntityCellValue;
Valeur de propriété
Remarques
source
Obtient la source de l’événement. Pour plus d’informations, consultez Excel.EventSource .
source: Excel.EventSource | "Local" | "Remote";
Valeur de propriété
Excel.EventSource | "Local" | "Remote"
Remarques
type
Obtient le type de l’événement. Pour plus d’informations, consultez Excel.EventType .
type: "LinkedEntityDataDomainLinkedEntityCellValueLoaded";
Valeur de propriété
"LinkedEntityDataDomainLinkedEntityCellValueLoaded"