Edit

Share via


Excel.LinkedEntityDataDomainCollection class

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

Properties

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

items

Gets the loaded child items in this collection.

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 LinkedEntityCellValue objects.

getCount()

Gets the number of linked entity data domains in the collection.

getItem(id)

Gets a linked entity data domain by its id.

getItemAt(index)

Gets a linked entity data domain by its index in the collection.

getItemByName(name)

Gets a linked entity data domain by its name.

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.

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.

load(options)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNames)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNamesAndPaths)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

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.

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.

Events

onLinkedEntityDataDomainAdded

Occurs when a new linked entity data domain is added to the workbook.

onRefreshCompleted

Occurs when the request to refresh LinkedEntityCellValue objects of a linked entity data domain is completed.

onRefreshModeChanged

Occurs when the refreshMode of a linked entity data domain is changed.

Property Details

context

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the loaded child items in this collection.

readonly items: Excel.LinkedEntityDataDomain[];

Property Value

Method Details

add(options)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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
Excel.LinkedEntityDataDomainCreateOptions

Options that are used to create the linked entity data domain to be added.

Returns

void

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

getCount()

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the number of linked entity data domains in the collection.

getCount(): OfficeExtension.ClientResult<number>;

Returns

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

getItem(id)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

getItemAt(index)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

getItemByName(name)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

getItemByNameOrNullObject(name)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

getItemOrNullObject(id)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

load(options)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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()

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

toJSON()

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

Event Details

onLinkedEntityDataDomainAdded

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Occurs when a new linked entity data domain is added to the workbook.

readonly onLinkedEntityDataDomainAdded: OfficeExtension.EventHandlers<Excel.LinkedEntityDataDomainAddedEventArgs>;

Event Type

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

onRefreshCompleted

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

onRefreshModeChanged

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Occurs when the refreshMode of a linked entity data domain is changed.

readonly onRefreshModeChanged: OfficeExtension.EventHandlers<Excel.LinkedEntityDataDomainRefreshModeChangedEventArgs>;

Event Type

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]