Excel.LinkedEntityCellValue interface
Represents a value whose properties derive from a service.
Remarks
Used by
- Excel.LinkedEntityCellValueLoadedEventArgs: linkedEntityCellValue
- Excel.LinkedEntityLoadServiceResult: entities
- Excel.PlaceholderErrorCellValue: target
- Excel.Workbook: getLinkedEntityCellValue
Examples
// Creates a linked entity cell value with properties and a card layout.
// This is typically returned from a linked entity load service function.
const productLinkedEntity: Excel.LinkedEntityCellValue = {
type: "LinkedEntity",
text: "Chai",
id: {
entityId: "P1",
domainId: "products",
serviceId: 268436224, // Service ID used by Excel to identify linked entity cell values associated with an add-in.
culture: "en-US"
},
properties: {
"Product Name": {
type: "String",
basicValue: "Chai"
},
"Unit Price": {
type: "FormattedNumber",
basicValue: 18,
numberFormat: "$* #,##0.00"
},
Discontinued: {
type: "Boolean",
basicValue: false
}
},
layouts: {
compact: {
icon: "ShoppingBag"
},
card: {
title: { property: "Product Name" },
sections: [
{
layout: "List",
properties: ["Product Name", "Unit Price", "Discontinued"]
}
]
}
}
};
Properties
| basic |
Represents the value that would be returned by |
| basic |
Represents the value that would be returned by |
| id | Represents the service source that provided the information in this value. |
| layouts | Represents layout information for views of this linked entity. |
| properties | Represents the properties of this linked entity and their metadata. |
| provider | Represents information that describes the service that provided data in this |
| text | Represents the text shown when a cell with this value is rendered. |
| type | Represents the type of this cell value. |
Property Details
basicType
Represents the value that would be returned by Range.valueTypes for a cell with this value.
basicType?: RangeValueType.error | "Error";
Property Value
error | "Error"
Remarks
basicValue
Represents the value that would be returned by Range.values for a cell with this value. When accessed through a valuesAsJson property, this string value aligns with the en-US locale. When accessed through a valuesAsJsonLocal property, this string value aligns with the user's display locale.
basicValue?: "#VALUE!" | string;
Property Value
"#VALUE!" | string
Remarks
id
Represents the service source that provided the information in this value.
id: LinkedEntityId;
Property Value
Remarks
layouts
Represents layout information for views of this linked entity.
layouts?: EntityViewLayouts;
Property Value
Remarks
properties
Represents the properties of this linked entity and their metadata.
properties?: {
[key: string]: EntityPropertyType;
};
Property Value
{ [key: string]: Excel.EntityPropertyType; }
Remarks
provider
Represents information that describes the service that provided data in this LinkedEntityCellValue. This information can be used for branding in entity cards.
provider?: CellValueProviderAttributes;
Property Value
Remarks
text
Represents the text shown when a cell with this value is rendered.
text?: string;
Property Value
string
Remarks
type
Represents the type of this cell value.
type: CellValueType.linkedEntity | "LinkedEntity";
Property Value
linkedEntity | "LinkedEntity"