Microsoft Excel ODBC Driver connection strings

Excel 97

Standard

Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDir=c:\mypath;

SQL syntax "SELECT [Column Name One], [Column Name Two] FROM [Sheet One$]". I.e. excel worksheet name followed by a "$" and wrapped in "[" "]" brackets.

Specify ReadOnly

[Microsoft][ODBC Excel Driver] Operation must use an updateable query. Use this connection string to avoid the error.

Driver={Microsoft Excel Driver (*.xls)};Dbq=C:\MyExcel.xls;ReadOnly=0;

ReadOnly = 0 specifies the connection to be updateable.

Excel 2000

Standard

Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDir=c:\mypath;

SQL syntax "SELECT [Column Name One], [Column Name Two] FROM [Sheet One$]". I.e. excel worksheet name followed by a "$" and wrapped in "[" "]" brackets.

Specify ReadOnly

[Microsoft][ODBC Excel Driver] Operation must use an updateable query. Use this connection string to avoid the error.

Driver={Microsoft Excel Driver (*.xls)};Dbq=C:\MyExcel.xls;ReadOnly=0;

ReadOnly = 0 specifies the connection to be updateable.

Excel 2002

Standard

Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDir=c:\mypath;

SQL syntax "SELECT [Column Name One], [Column Name Two] FROM [Sheet One$]". I.e. excel worksheet name followed by a "$" and wrapped in "[" "]" brackets.

Specify ReadOnly

[Microsoft][ODBC Excel Driver] Operation must use an updateable query. Use this connection string to avoid the error.

Driver={Microsoft Excel Driver (*.xls)};Dbq=C:\MyExcel.xls;ReadOnly=0;

ReadOnly = 0 specifies the connection to be updateable.

Excel 2003

Standard

Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDir=c:\mypath;

SQL syntax "SELECT [Column Name One], [Column Name Two] FROM [Sheet One$]". I.e. excel worksheet name followed by a "$" and wrapped in "[" "]" brackets.

Specify ReadOnly

[Microsoft][ODBC Excel Driver] Operation must use an updateable query. Use this connection string to avoid the error.

Driver={Microsoft Excel Driver (*.xls)};Dbq=C:\MyExcel.xls;ReadOnly=0;

ReadOnly = 0 specifies the connection to be updateable.