Connections.Add2 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
向工作簿添加新连接。
public Microsoft.Office.Interop.Excel.WorkbookConnection Add2 (string Name, string Description, object ConnectionString, object CommandText, object lCmdtype, object CreateModelConnection, object ImportRelationships);
Public Function Add2 (Name As String, Description As String, ConnectionString As Object, CommandText As Object, Optional lCmdtype As Object, Optional CreateModelConnection As Object, Optional ImportRelationships As Object) As WorkbookConnection
参数
- Name
- String
连接的名称。
- Description
- String
连接的简要说明。
- ConnectionString
- Object
连接字符串。
- CommandText
- Object
用于创建连接的命令文本。
- lCmdtype
- Object
命令类型。
- CreateModelConnection
- Object
指定是否创建到 PowerPivot 模型的连接。
- ImportRelationships
- Object
指定是否导入任何现有关系。