Modifica

Condividi tramite


Workbooks.OpenDatabase(String, Object, Object, Object, Object) Method

Definition

Returns a Workbook object representing a database.

public Microsoft.Office.Interop.Excel.Workbook OpenDatabase (string Filename, object CommandText, object CommandType, object BackgroundQuery, object ImportDataAs);
Public Function OpenDatabase (Filename As String, Optional CommandText As Object, Optional CommandType As Object, Optional BackgroundQuery As Object, Optional ImportDataAs As Object) As Workbook

Parameters

Filename
String

Required String. The connection string.

CommandText
Object

Optional Object. The command text of the query.

CommandType
Object

Optional Object. The command type of the query. The following command types are available: Default, SQL, and Table.

BackgroundQuery
Object

Optional Object. The background of the query.

ImportDataAs
Object

Optional Object. Determines the format of the query.

Returns

Applies to