Excel.LinkedEntityDataDomainCollection class
Represents a collection of LinkedEntityDataDomain
objects. The collection can contain linked entity data domains such as stocks, geography, or currencies defined by service data providers, such as Bing or Power BI, or linked entity data domains defined by Office Add-ins.
- Extends
Remarks
Properties
Methods
add(options) | Adds a linked entity data domain object defined by the Office Add-in to the collection. Once the linked entity data domain is added, it can be used to create |
get |
Gets the number of linked entity data domains in the collection. |
get |
Gets a linked entity data domain by its |
get |
Gets a linked entity data domain by its index in the collection. |
get |
Gets a linked entity data domain by its |
get |
Gets a linked entity data domain by its |
get |
Gets a linked entity data domain by its |
load(options) | Queues up a command to load the specified properties of the object. You must call |
load(property |
Queues up a command to load the specified properties of the object. You must call |
load(property |
Queues up a command to load the specified properties of the object. You must call |
refresh |
Refreshes all |
toJSON() | Overrides the JavaScript |
Events
on |
Occurs when a new linked entity data domain is added to the workbook. |
on |
Occurs when the request to refresh |
on |
Occurs when the |
context
The request context associated with the object. This connects the add-in's process to the Office host application's process.
context: RequestContext;
Property Value
items
Gets the loaded child items in this collection.
readonly items: Excel.LinkedEntityDataDomain[];
Property Value
add(options)
Adds a linked entity data domain object defined by the Office Add-in to the collection. Once the linked entity data domain is added, it can be used to create LinkedEntityCellValue
objects.
add(options: Excel.LinkedEntityDataDomainCreateOptions): void;
Parameters
Options that are used to create the linked entity data domain to be added.
Returns
void
Remarks
getCount()
Gets the number of linked entity data domains in the collection.
getCount(): OfficeExtension.ClientResult<number>;
Returns
OfficeExtension.ClientResult<number>
Remarks
getItem(id)
Gets a linked entity data domain by its id
.
getItem(id: string): Excel.LinkedEntityDataDomain;
Parameters
- id
-
string
The id
of the LinkedEntityDataDomain
object to be retrieved.
Returns
The linked entity data domain with the given id
. If there are multiple linked entity data domains with the same id
, the one defined by this Office Add-in will be returned.
Remarks
getItemAt(index)
Gets a linked entity data domain by its index in the collection.
getItemAt(index: number): Excel.LinkedEntityDataDomain;
Parameters
- index
-
number
The index of the linked entity data domain in the collection.
Returns
The linked entity data domain at the given index.
Remarks
getItemByName(name)
Gets a linked entity data domain by its name
.
getItemByName(name: string): Excel.LinkedEntityDataDomain;
Parameters
- name
-
string
The name
of the LinkedEntityDataDomain
object to be retrieved.
Returns
The linked entity data domain with the given name
. If there are multiple linked entity data domains with the same name
, the one defined by this Office Add-in will be returned.
Remarks
getItemByNameOrNullObject(name)
Gets a linked entity data domain by its name
. If the linked entity data domain does not exist, then this function will return an object with its isNullObject
property set to true
. For further information, see *OrNullObject methods and properties.
getItemByNameOrNullObject(name: string): Excel.LinkedEntityDataDomain;
Parameters
- name
-
string
The name
of the LinkedEntityDataDomain
object to be retrieved.
Returns
The linked entity data domain with the given name
. If there are multiple linked entity data domains with the same name
, the one defined by this Office Add-in will be returned.
Remarks
getItemOrNullObject(id)
Gets a linked entity data domain by its id
. If the linked entity data domain does not exist, then this function will return an object with its isNullObject
property set to true
. For further information, see *OrNullObject methods and properties.
getItemOrNullObject(id: string): Excel.LinkedEntityDataDomain;
Parameters
- id
-
string
The id
of the LinkedEntityDataDomain
object to be retrieved.
Returns
The linked entity data domain with the given id
. If there are multiple linked entity data domains with the same id
, the one defined by this Office Add-in will be returned.
Remarks
load(options)
Queues up a command to load the specified properties of the object. You must call context.sync()
before reading the properties.
load(options?: Excel.Interfaces.LinkedEntityDataDomainCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.LinkedEntityDataDomainCollection;
Parameters
- options
-
Excel.Interfaces.LinkedEntityDataDomainCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions
Provides options for which properties of the object to load.
Returns
load(propertyNames)
Queues up a command to load the specified properties of the object. You must call context.sync()
before reading the properties.
load(propertyNames?: string | string[]): Excel.LinkedEntityDataDomainCollection;
Parameters
- propertyNames
-
string | string[]
A comma-delimited string or an array of strings that specify the properties to load.
Returns
load(propertyNamesAndPaths)
Queues up a command to load the specified properties of the object. You must call context.sync()
before reading the properties.
load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Excel.LinkedEntityDataDomainCollection;
Parameters
- propertyNamesAndPaths
- OfficeExtension.LoadOption
propertyNamesAndPaths.select
is a comma-delimited string that specifies the properties to load, and propertyNamesAndPaths.expand
is a comma-delimited string that specifies the navigation properties to load.
Returns
refreshAll()
Refreshes all LinkedEntityCellValue
objects of all linked entity data domains in this collection. The refresh request can fail if the data providers are busy or temporarily inaccessible.
refreshAll(): void;
Returns
void
Remarks
toJSON()
Overrides the JavaScript toJSON()
method in order to provide more useful output when an API object is passed to JSON.stringify()
. (JSON.stringify
, in turn, calls the toJSON
method of the object that's passed to it.) Whereas the original Excel.LinkedEntityDataDomainCollection
object is an API object, the toJSON
method returns a plain JavaScript object (typed as Excel.Interfaces.LinkedEntityDataDomainCollectionData
) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
toJSON(): Excel.Interfaces.LinkedEntityDataDomainCollectionData;
Returns
onLinkedEntityDataDomainAdded
Occurs when a new linked entity data domain is added to the workbook.
readonly onLinkedEntityDataDomainAdded: OfficeExtension.EventHandlers<Excel.LinkedEntityDataDomainAddedEventArgs>;
Event Type
Remarks
onRefreshCompleted
Occurs when the request to refresh LinkedEntityCellValue
objects of a linked entity data domain is completed.
readonly onRefreshCompleted: OfficeExtension.EventHandlers<Excel.LinkedEntityDataDomainRefreshCompletedEventArgs>;
Event Type
Remarks
onRefreshModeChanged
Occurs when the refreshMode
of a linked entity data domain is changed.
readonly onRefreshModeChanged: OfficeExtension.EventHandlers<Excel.LinkedEntityDataDomainRefreshModeChangedEventArgs>;