編輯

共用方式為


ModelConnection Interface

Definition

Contain information for the new Model Connection Type introduced in Excel 2013 to interact with the integrated data model.

public interface class ModelConnection
[System.Runtime.InteropServices.Guid("000244D1-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface ModelConnection
Public Interface ModelConnection
Attributes

Remarks

To use for all PivotTables connected to the model, there will have a new “special” workbook connection which always exists (and cannot be deleted) in workbooks which have a data model. It gets created when the model is first created in a workbook. All properties on this special workbook connection are read-only. Its name is: Workbook Data Model.

Properties

ADOConnection

The ADO Connection Object is used to create an open connection to a data source. Enables addins, such as Powerview, to create a direct connection to the engine and hence the data model. ADOConnection object Read-only.

Application

Returns an Application object that represents the Excel application. Read-only.

CalculatedMembers
CommandText

Returns or sets the command string for the specified data source. Object (object in C#) Read/Write

CommandType

Returns or sets one of the XlCmdType constants. Read/Write

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Integer (int in C#).

Parent

Returns an Object that represents the parent object of the specified ModelConnection object. Read-only.

Applies to