Search notes:

OLE DB Provider for Microsoft Access database engine: Connection string

Provider

An connection string for the Microsoft Access database engine OLE DB provider needs to have the Provider key with a value of one of

Data Source

The second required key is Data Source. Its value is a file system path that locates the data source that is accessed through through the provider.
By default, Data Source names an MS Access database file (*.accdb).
If the specified another document format (such as Excel etc.), the connection string also requires a key-less value to identify the document format. The possible values are found in the registry under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Access Connectivity Engine\ISAM Formats
The following connection string refers to an Access database:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=P:\ath\to\access\db.accdb
The following connection string refers to a (macro-less, that is *.xlsx) Excel worksheet. Note the necessary Excel 12.0 right after the Provider=…; part.
The connection string also requires to specifiy if the data contains a header (HDR=Yes):
Provider=Microsoft.ACE.OLEDB.12.0;Excel 12.0 Xml;Data Source=P:\ath\to\excel\worksheet.xlsx;HDR=Yes

TODO

IMEX

The extended attribute IMEX (seen for a connection to Excel) stands for Import-Export Module and can probably be set to apparently be set to 0, 1 or 2.
As per this website, setting IMEX to 1 tells the driver to read all («intermixed»?) columns as text.
This website also claims that setting IMEX to 0 forces TypeGuessRows=0.
When set to 1 or 2, a Workbook cannot be created.

See also

General notes about Connetion strings in OLE-DB

Index