Excel.LinkedDataType 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 linked data type. A linked data type is a data type connected to an online data source.
- 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. |
data |
The name of the data provider for the linked data type. This may change when information is retrieved from the service. |
last |
The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. Returns |
name | The name of the linked data type. This may change when information is retrieved from the service. |
periodic |
The frequency, in seconds, at which the linked data type is refreshed if |
refresh |
The mechanism by which the data for the linked data type is retrieved. |
service |
The unique ID of the linked data type. |
supported |
Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service. |
Methods
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 |
request |
Makes a request to refresh the linked data type. If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled. |
request |
Makes a request to change the refresh mode for this linked data type. If the given refresh mode is not supported by this linked data type the mode is left unchanged. If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type. |
request |
Makes a request to change the refresh mode for this linked data type. If the given refresh mode is not supported by this linked data type the mode is left unchanged. If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type. |
toJSON() | Overrides the JavaScript |
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.
The name of the data provider for the linked data type. This may change when information is retrieved from the service.
readonly dataProvider: string;
Property Value
string
Remarks
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.
The local time-zone date and time since the workbook was opened when the linked data type was last refreshed. Returns undefined
if the linked data type has not been refreshed.
readonly lastRefreshed: Date;
Property Value
Date
Remarks
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.
The name of the linked data type. This may change when information is retrieved from the service.
readonly name: string;
Property Value
string
Remarks
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.
The frequency, in seconds, at which the linked data type is refreshed if refreshMode
is set to "Periodic".
readonly periodicRefreshInterval: number;
Property Value
number
Remarks
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.
The mechanism by which the data for the linked data type is retrieved.
readonly refreshMode: Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic";
Property Value
Excel.LinkedDataTypeRefreshMode | "Unknown" | "Manual" | "OnLoad" | "Periodic"
Remarks
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.
The unique ID of the linked data type.
readonly serviceId: number;
Property Value
number
Remarks
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.
Returns an array with all the refresh modes supported by the linked data type. The contents of the array may change when information is retrieved from the service.
readonly supportedRefreshModes: Excel.LinkedDataTypeRefreshMode[];
Property Value
Remarks
Method Details
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.LinkedDataTypeLoadOptions): Excel.LinkedDataType;
Parameters
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.LinkedDataType;
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.LinkedDataType;
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
requestRefresh()
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.
Makes a request to refresh the linked data type. If the service is busy or otherwise temporarily inaccessible, the request will not be fulfilled.
requestRefresh(): void;
Returns
void
Remarks
requestSetRefreshMode(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.
Makes a request to change the refresh mode for this linked data type. If the given refresh mode is not supported by this linked data type the mode is left unchanged. If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type.
requestSetRefreshMode(refreshMode: Excel.LinkedDataTypeRefreshMode): void;
Parameters
- refreshMode
- Excel.LinkedDataTypeRefreshMode
The intended mode to which this linked data type is requested to change.
Returns
void
Remarks
requestSetRefreshMode(refreshModeString)
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.
Makes a request to change the refresh mode for this linked data type. If the given refresh mode is not supported by this linked data type the mode is left unchanged. If set to "Periodic", the refresh interval is set to a predetermined value based on the particular linked data type.
requestSetRefreshMode(refreshModeString: "Unknown" | "Manual" | "OnLoad" | "Periodic"): void;
Parameters
- refreshModeString
-
"Unknown" | "Manual" | "OnLoad" | "Periodic"
The intended mode to which this linked data type is requested to change.
Returns
void
Remarks
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 is passed to it.) Whereas the original Excel.LinkedDataType
object is an API object, the toJSON
method returns a plain JavaScript object (typed as Excel.Interfaces.LinkedDataTypeData
) that contains shallow copies of any loaded child properties from the original object.
toJSON(): Excel.Interfaces.LinkedDataTypeData;
Returns
Office Add-ins