Excel.DataConnectionCollection class

表示属于工作簿或工作表的所有数据连接的集合。Represents a collection of all the Data Connections that are part of the workbook or worksheet.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

Extends

属性

context

与该对象关联的请求上下文。The request context associated with the object. 这会将加载项的进程连接到 Office 主机应用程序的进程。This connects the add-in's process to the Office host application's process.

方法

refreshAll()

刷新集合中的所有数据连接。Refreshes all the Data Connections in the collection.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

toJSON()

重写 JavaScript toJSON()方法, 以便在将 API 对象传递到时提供更有用的输出JSON.stringify()Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify反过来, 也会调用传递toJSON给它的对象的方法。尽管原始 DataConnectionCollection 对象是 API 对象, 但toJSON方法返回一个无格式的 JavaScript 对象 (类型为Excel.Interfaces.DataConnectionCollectionData, in turn, calls the toJSON method of the object that is passed to it.) Whereas the original Excel.DataConnectionCollection object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.DataConnectionCollectionData), 其中包含原始对象中所有已加载的子属性的浅表副本。) that contains shallow copies of any loaded child properties from the original object.

属性详细信息

context

与该对象关联的请求上下文。The request context associated with the object. 这会将加载项的进程连接到 Office 主机应用程序的进程。This connects the add-in's process to the Office host application's process.

context: RequestContext;

属性值

RequestContext

方法详细信息

refreshAll()

刷新集合中的所有数据连接。Refreshes all the Data Connections in the collection.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

refreshAll(): void;

返回

void

toJSON()

重写 JavaScript toJSON()方法, 以便在将 API 对象传递到时提供更有用的输出JSON.stringify()Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify反过来, 也会调用传递toJSON给它的对象的方法。尽管原始 DataConnectionCollection 对象是 API 对象, 但toJSON方法返回一个无格式的 JavaScript 对象 (类型为Excel.Interfaces.DataConnectionCollectionData, in turn, calls the toJSON method of the object that is passed to it.) Whereas the original Excel.DataConnectionCollection object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.DataConnectionCollectionData), 其中包含原始对象中所有已加载的子属性的浅表副本。) that contains shallow copies of any loaded child properties from the original object.

toJSON(): {
            [key: string]: string;
        };

返回

{ [key: string]: string; }