Edytuj

Udostępnij za pośrednictwem


Connections.Add2 Method

Definition

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.

Returns

Applies to