Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

Excel.LinkedEntityDataDomainCollection class

Package:
excel

Represents a collection ofLinkedEntityDataDomain 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.

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

getCount()

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

getItem(id)

Gets a linked entity data domain by itsid.

getItemAt(index)

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

getItemByName(name)

Gets a linked entity data domain by itsname.

getItemByNameOrNullObject(name)

Gets a linked entity data domain by itsname. If the linked entity data domain does not exist, then this method returns an object with itsisNullObject property set totrue. For further information, see*OrNullObject methods and properties.

getItemOrNullObject(id)

Gets a linked entity data domain by itsid. If the linked entity data domain does not exist, then this method returns an object with itsisNullObject property set totrue. For further information, see*OrNullObject methods and properties.

load(options)

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

load(propertyNames)

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

load(propertyNamesAndPaths)

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

refreshAll()

Refreshes allLinkedEntityCellValue 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 JavaScripttoJSON() method in order to provide more useful output when an API object is passed toJSON.stringify(). (JSON.stringify, in turn, calls thetoJSON method of the object that's passed to it.) Whereas the originalExcel.LinkedEntityDataDomainCollection object is an API object, thetoJSON method returns a plain JavaScript object (typed asExcel.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 refreshLinkedEntityCellValue objects of a linked entity data domain is completed.

onRefreshModeChanged

Occurs when therefreshMode of a linked entity data domain is changed.

Property Details

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

Method Details

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 createLinkedEntityCellValue 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 1.19 ]

getCount()

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

getCount(): OfficeExtension.ClientResult<number>;

Returns

Remarks

[API set: ExcelApi 1.19 ]

getItem(id)

Gets a linked entity data domain by itsid.

getItem(id: string): Excel.LinkedEntityDataDomain;

Parameters

id

string

Theid of theLinkedEntityDataDomain object to be retrieved.

Returns

The linked entity data domain with the givenid. If there are multiple linked entity data domains with the sameid, the one defined by this Office Add-in will be returned.

Remarks

[API set: ExcelApi 1.19 ]

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

[API set: ExcelApi 1.19 ]

getItemByName(name)

Gets a linked entity data domain by itsname.

getItemByName(name: string): Excel.LinkedEntityDataDomain;

Parameters

name

string

Thename of theLinkedEntityDataDomain object to be retrieved.

Returns

The linked entity data domain with the givenname. If there are multiple linked entity data domains with the samename, the one defined by this Office Add-in will be returned.

Remarks

[API set: ExcelApi 1.19 ]

getItemByNameOrNullObject(name)

Gets a linked entity data domain by itsname. If the linked entity data domain does not exist, then this method returns an object with itsisNullObject property set totrue. For further information, see*OrNullObject methods and properties.

getItemByNameOrNullObject(name: string): Excel.LinkedEntityDataDomain;

Parameters

name

string

Thename of theLinkedEntityDataDomain object to be retrieved.

Returns

The linked entity data domain with the givenname. If there are multiple linked entity data domains with the samename, the one defined by this Office Add-in will be returned.

Remarks

[API set: ExcelApi 1.19 ]

getItemOrNullObject(id)

Gets a linked entity data domain by itsid. If the linked entity data domain does not exist, then this method returns an object with itsisNullObject property set totrue. For further information, see*OrNullObject methods and properties.

getItemOrNullObject(id: string): Excel.LinkedEntityDataDomain;

Parameters

id

string

Theid of theLinkedEntityDataDomain object to be retrieved.

Returns

The linked entity data domain with the givenid. If there are multiple linked entity data domains with the sameid, the one defined by this Office Add-in will be returned.

Remarks

[API set: ExcelApi 1.19 ]

load(options)

Queues up a command to load the specified properties of the object. You must callcontext.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 callcontext.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 callcontext.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, andpropertyNamesAndPaths.expand is a comma-delimited string that specifies the navigation properties to load.

Returns

refreshAll()

Refreshes allLinkedEntityCellValue 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 1.19 ]

toJSON()

Overrides the JavaScripttoJSON() method in order to provide more useful output when an API object is passed toJSON.stringify(). (JSON.stringify, in turn, calls thetoJSON method of the object that's passed to it.) Whereas the originalExcel.LinkedEntityDataDomainCollection object is an API object, thetoJSON method returns a plain JavaScript object (typed asExcel.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

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 1.19 ]

onRefreshCompleted

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

readonly onRefreshCompleted: OfficeExtension.EventHandlers<Excel.LinkedEntityDataDomainRefreshCompletedEventArgs>;

Event Type

Remarks

[API set: ExcelApi 1.19 ]

onRefreshModeChanged

Occurs when therefreshMode of a linked entity data domain is changed.

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

Event Type

Remarks

[API set: ExcelApi 1.19 ]

Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo