Connections.Add2 Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a new connection to the workbook.
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
Parameters
- Name
- String
Name of the connection.
- Description
- String
Brief description about the connection.
- ConnectionString
- Object
The connection string.
- CommandText
- Object
The command text to create the connection.
- lCmdtype
- Object
Command type.
- CreateModelConnection
- Object
Specifies whether to create a connection to the PowerPivot model.
- ImportRelationships
- Object
Specifies whether to import any existing relationships.