Excel.LinkedEntityId interface
El objeto de identificador de entidad vinculado representa un conjunto de propiedades que describen un servicio y una cultura para localizar este valor definido por el servicio.
Comentarios
Conjunto de API: ExcelApi 1.16
Usada por
- Excel.LinkedEntityCellValue: id
- Excel.LinkedEntityCellValueLoadedEventArgs: id
- Excel.LinkedEntityDataDomainCollection: loadLinkedEntityCellValue
- Excel.Workbook: getLinkedEntityCellValue
Ejemplos
// 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.");
});
Propiedades
| culture | Representa qué referencia cultural de idioma se usó para crear este |
| domain |
Representa un dominio específico de un servicio utilizado para crear el |
| entity |
Representa un identificador específico de un servicio utilizado para crear el |
| service |
Representa qué servicio se usó para crear el |
Detalles de las propiedades
culture
Representa qué referencia cultural de idioma se usó para crear este CellValuearchivo .
culture: string;
Valor de propiedad
string
Comentarios
domainId
Representa un dominio específico de un servicio utilizado para crear el CellValuearchivo .
domainId?: string;
Valor de propiedad
string
Comentarios
entityId
Representa un identificador específico de un servicio utilizado para crear el CellValuearchivo .
entityId: string;
Valor de propiedad
string
Comentarios
serviceId
Representa qué servicio se usó para crear el CellValuearchivo .
serviceId: number;
Valor de propiedad
number