Excel.LinkedEntityDataDomainRefreshMode enum

LinkedEntityDataDomain のLinkedEntityCellValueオブジェクトの更新モード設定を表します。

注釈

API セット: ExcelApi 1.19

この列挙型は、Excel on the web ではサポートされていません。

使用元

例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/20-data-types/data-types-linked-entities.yaml

// Register the product, category, and supplier data sources with Excel.
await Excel.run(async (context) => {
    const domains: Excel.LinkedEntityDataDomainCollection = context.workbook.linkedEntityDataDomains;
    const refreshModes: Excel.LinkedEntityDataDomainRefreshMode[] = [
        Excel.LinkedEntityDataDomainRefreshMode.manual,
        Excel.LinkedEntityDataDomainRefreshMode.onLoad,
        Excel.LinkedEntityDataDomainRefreshMode.periodic
    ];
    // Script Lab prefixes the function ID with the companion sample's name, without spaces.
    const loadFunctionId = "LINKEDENTITYLOADSERVICE.CONTOSOLOADSERVICE";
    const options: Excel.LinkedEntityDataDomainCreateOptions[] = [
        {
            dataProvider: "Contoso",
            id: "products",
            name: "Products",
            loadFunctionId,
            periodicRefreshInterval: 300,
            supportedRefreshModes: refreshModes
        },
        {
            dataProvider: "Contoso",
            id: "categories",
            name: "Categories",
            loadFunctionId,
            periodicRefreshInterval: 300,
            supportedRefreshModes: refreshModes
        },
        {
            dataProvider: "Contoso",
            id: "suppliers",
            name: "Suppliers",
            loadFunctionId
        }
    ];

    // Replace only this sample's domains so registration is repeatable.
    const existingDomains: Excel.LinkedEntityDataDomain[] = options.map((options) =>
        domains.getItemOrNullObject(options.id)
    );
    await context.sync();
    existingDomains.forEach((domain) => {
        if (!domain.isNullObject) {
            domain.delete();
        }
    });
    options.forEach((options) => domains.add(options));
    await context.sync();
    console.log("Registered Products, Categories, and Suppliers. Manual refresh is the default.");
});

フィールド

manual = "Manual"

ユーザーによる手動更新。 更新は自動的にトリガーされません。

このフィールドは、Excel on the web ではサポートされていません。

onLoad = "OnLoad"

ブックの読み込み時に更新。Bing や Power BI などのサービス データ プロバイダーによって定義されたリンクされたエンティティ データ ドメインに適用できます。 アドイン読み込み時に更新。Office アドインによって定義されたリンクされたエンティティ データ ドメインに適用されます。

このフィールドは、Excel on the web ではサポートされていません。

periodic = "Periodic"

periodicRefreshInterval で指定された頻度 (秒単位) に基づいて自動的に更新されます。 Bing や Power BI などのサービス データ プロバイダーによって定義されたリンクされたエンティティ データ ドメインの場合、ブックを開くたびに、この値によって更新も開始されます。 Office アドインによって定義されたリンクされたエンティティ データ ドメインの場合、アドインが読み込まれるたびに、この値によって更新も開始されます。

このフィールドは、Excel on the web ではサポートされていません。

unknown = "Unknown"

更新モードが不明であるか、サポートされていません。

このフィールドは、Excel on the web ではサポートされていません。