Excel.LinkedEntityId interface

链接的实体 ID 对象表示一组属性,用于描述用于查找此服务定义值的服务和区域性。

注解

API 集:ExcelApi 1.16

使用方

示例

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

// Insert a product identity that Excel resolves through the companion load service.
await Excel.run(async (context) => {
    const sheet: Excel.Worksheet = context.workbook.worksheets.getItem("Sample");
    const productId: Excel.LinkedEntityId = {
        entityId: "P1",
        domainId: "products",
        serviceId: 268436224,
        culture: "en-US"
    };
    const product: Excel.LinkedEntityCellValue = {
        type: Excel.CellValueType.linkedEntity,
        id: productId,
        text: "Chai",
        basicType: "Error",
        basicValue: "#VALUE!"
    };
    const productRange: Excel.Range = sheet.getRange("A2");
    productRange.valuesAsJson = [[product]];
    sheet.getRange("B2:D2").formulas = [["=A2.[Unit Price]", "=A2.Category", "=A2.Supplier"]];
    sheet.getRange("B2").numberFormat = [["$0.00"]];
    await context.sync();
    console.log("Inserted Chai in A2. Excel loads its properties asynchronously; open its card to explore.");
});

属性

culture

表示使用了哪种语言区域性来创建此项 CellValue。

domainId

表示特定于用于创建 CellValue服务的域。

entityId

表示特定于用于创建 CellValue.

serviceId

表示 CellValue创建 .

属性详细信息

culture

表示使用了哪种语言区域性来创建此项 CellValue。

culture: string;

属性值

string

注解

API 集:ExcelApi 1.16

domainId

表示特定于用于创建 CellValue服务的域。

domainId?: string;

属性值

string

注解

API 集:ExcelApi 1.16

entityId

表示特定于用于创建 CellValue.

entityId: string;

属性值

string

注解

API 集:ExcelApi 1.16

serviceId

表示 CellValue创建 .

serviceId: number;

属性值

number

注解

API 集:ExcelApi 1.16