Oledb Excel conection

How to write connection string to 2003 Excel file( .xls ) with Operating system 64 bits
because the provider " Provider=Microsoft.Jet.OLEDB.4.0 " not exist in 64 bits OS.

3 answers

Use the Microsoft ACE OLEDB 12.0 provider instead.

Connection strings here:
http://www.connectionstrings.com/ace-oledb-12-0/

Driver info here:
http://www.connectionstrings.com/ace-oledb-12-0/info-and-download/

Also look at

  • http://www.connectionstrings.com/the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine/
  • http://www.connectionstrings.com/using-jet-in-64-bit-environments/

for solving 64-bit related issues.

Good luck!

Dear Max WIKSTRÔM,
i write many connection string to connect on XSL file(.xls exetension) but all failed for example:

String sConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strPath + ";Extended Properties=\"Excel 8.0 ;HDR=NO\"";

But in contrast i can connect to XLSX file with this conection :

 String sConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strPath + ";Extended Properties=\"Excel 12.0 Xml;\"";

the Error: Could not find installable ISAM.

i remember you that my system is 64 bits(Windows 7) and i have Office 2007 installed

Not very intuitive but I believe this one should work

"Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=c:\path\file.xls;Extended Properties="Excel 12.0;HDR=YES;""