Excel.LinkedEntityCellValueLoadedEventArgs interface
指定したLinkedEntityIdによって要求されたLinkedEntityCellValueに関する情報を提供します。
注釈
使用元
例
// 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();
});
}
プロパティ
| error |
|
| id | 要求された |
| linked |
要求された |
| source | イベントのソースを取得します。 詳細は「 |
| type | イベントの種類を取得します。 詳細は「 |
プロパティの詳細
error
id
要求されたLinkedEntityCellValueのLinkedEntityIdを取得します。
id: LinkedEntityId;
プロパティ値
注釈
linkedEntityCellValue
要求されたLinkedEntityIdのLinkedEntityCellValueを取得します。 読み込み操作に失敗した場合、このプロパティは null。
linkedEntityCellValue?: LinkedEntityCellValue;
プロパティ値
注釈
source
イベントのソースを取得します。 詳細は「Excel.EventSource」をご覧ください。
source: Excel.EventSource | "Local" | "Remote";
プロパティ値
Excel.EventSource | "Local" | "Remote"
注釈
type
イベントの種類を取得します。 詳細は「Excel.EventType」をご覧ください。
type: "LinkedEntityDataDomainLinkedEntityCellValueLoaded";
プロパティ値
"LinkedEntityDataDomainLinkedEntityCellValueLoaded"