Edit

Share via


Excel.LinkedEntityDataDomain 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 specific category or field of information that shares some common characteristics or attributes. A data domain is linked to a data provider that acts as the data source for LinkedEntityCellValue objects in the workbook. A data domain is a category of data, such as stocks, geography, or currencies. A data provider is a service, such as Bing, Power BI, or an Office Add-in.

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.

dataProvider

Gets the name of the data provider for the linked entity data domain. This name can change based on the information from the data provider.

id

Gets the ID of the linked entity data domain defined by Office Add-ins. This ID is not applicable to linked entity data domains defined by service data providers, such as Bing or Power BI.

lastRefreshed

Gets the date and time (in the local time zone) since the workbook was opened and the LinkedEntityCellValue objects of this linked entity data domain were last refreshed. Returns undefined if LinkedEntityCellValue objects have not been refreshed since the workbook was opened.

loadFunctionId

Gets the ID of the custom function that is called on demand to resolve or refresh the LinkedEntityCellValue objects of the linked entity data domain defined by Office Add-ins. For further information, see Autogenerate JSON metadata for custom functions: ID. This ID is not applicable to linked entity data domains defined by service data providers, such as Bing or Power BI.

name

Gets the name of the linked entity data domain. This name can change based on the information from the data provider.

periodicRefreshInterval

Gets the frequency, in seconds, at which LinkedEntityCellValue objects of this linked entity data domain are refreshed automatically. The refresh interval only applies if the refreshMode is set to "Periodic".

refreshMode

Gets or sets the refresh mode that defines how and when the LinkedEntityCellValue objects of this linked entity data domain are refreshed. If the refresh mode being set isn't supported by this linked entity data domain, then the current refresh mode is not changed. If the refresh mode is set to "Periodic", the refresh interval is set to the periodicRefreshInterval of this linked entity data domain.

serviceId

Gets the service ID of the linked entity data domain. This ID is a permanently reserved value for all linked entity data domains which are defined by service data providers, such as Bing or Power BI, or defined by Office Add-ins. This ID never changes across user sessions.

supportedRefreshModes

Gets all the refresh modes supported by the linked entity data domain. This array can change based on the information provided by the data provider.

Methods

delete()

Deletes this object from the LinkedEntityDataDomainCollection. Once the linked entity data domain is deleted, new LinkedEntityCellValue objects of this linked entity data domain can't be created and existing LinkedEntityCellValue objects can't be refreshed. An Office Add-in can only delete linked entity data domains that it created.

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.

refresh()

Refreshes all LinkedEntityCellValue objects of this linked entity data domain. The refresh request can fail if the data provider is 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.LinkedEntityDataDomain object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.LinkedEntityDataDomainData) that contains shallow copies of any loaded child properties from the original object.

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

dataProvider

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 name of the data provider for the linked entity data domain. This name can change based on the information from the data provider.

readonly dataProvider: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

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 the ID of the linked entity data domain defined by Office Add-ins. This ID is not applicable to linked entity data domains defined by service data providers, such as Bing or Power BI.

readonly id: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

lastRefreshed

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 date and time (in the local time zone) since the workbook was opened and the LinkedEntityCellValue objects of this linked entity data domain were last refreshed. Returns undefined if LinkedEntityCellValue objects have not been refreshed since the workbook was opened.

readonly lastRefreshed: Date;

Property Value

Date

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

loadFunctionId

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 ID of the custom function that is called on demand to resolve or refresh the LinkedEntityCellValue objects of the linked entity data domain defined by Office Add-ins. For further information, see Autogenerate JSON metadata for custom functions: ID. This ID is not applicable to linked entity data domains defined by service data providers, such as Bing or Power BI.

readonly loadFunctionId: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

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 the name of the linked entity data domain. This name can change based on the information from the data provider.

readonly name: string;

Property Value

string

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

periodicRefreshInterval

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 frequency, in seconds, at which LinkedEntityCellValue objects of this linked entity data domain are refreshed automatically. The refresh interval only applies if the refreshMode is set to "Periodic".

readonly periodicRefreshInterval: number;

Property Value

number

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

refreshMode

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 or sets the refresh mode that defines how and when the LinkedEntityCellValue objects of this linked entity data domain are refreshed. If the refresh mode being set isn't supported by this linked entity data domain, then the current refresh mode is not changed. If the refresh mode is set to "Periodic", the refresh interval is set to the periodicRefreshInterval of this linked entity data domain.

refreshMode: Excel.LinkedEntityDataDomainRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic";

Property Value

Excel.LinkedEntityDataDomainRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

serviceId

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 service ID of the linked entity data domain. This ID is a permanently reserved value for all linked entity data domains which are defined by service data providers, such as Bing or Power BI, or defined by Office Add-ins. This ID never changes across user sessions.

readonly serviceId: number;

Property Value

number

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

supportedRefreshModes

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 all the refresh modes supported by the linked entity data domain. This array can change based on the information provided by the data provider.

readonly supportedRefreshModes: Excel.LinkedEntityDataDomainRefreshMode[];

Property Value

Remarks

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

Method Details

delete()

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.

Deletes this object from the LinkedEntityDataDomainCollection. Once the linked entity data domain is deleted, new LinkedEntityCellValue objects of this linked entity data domain can't be created and existing LinkedEntityCellValue objects can't be refreshed. An Office Add-in can only delete linked entity data domains that it created.

delete(): void;

Returns

void

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.LinkedEntityDataDomainLoadOptions): Excel.LinkedEntityDataDomain;

Parameters

options
Excel.Interfaces.LinkedEntityDataDomainLoadOptions

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.LinkedEntityDataDomain;

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?: {
            select?: string;
            expand?: string;
        }): Excel.LinkedEntityDataDomain;

Parameters

propertyNamesAndPaths

{ select?: string; expand?: string; }

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

refresh()

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 this linked entity data domain. The refresh request can fail if the data provider is busy or temporarily inaccessible.

refresh(): 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.LinkedEntityDataDomain object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.LinkedEntityDataDomainData) that contains shallow copies of any loaded child properties from the original object.

toJSON(): Excel.Interfaces.LinkedEntityDataDomainData;

Returns