Connecting to Excel 2010 64bit
Hopefully some one can help here I have 64bit winform app that is trying to connection Excel 2010 64bit. I researched a lot websites and came up with the following connection string:
Provider=Microsoft.ACE.OLEDB.12.0;data source=<Filename>;Extended Properties="Excel 14.0;HDR=Yes;IMEX=1"
But my code runs I get the following OleDBException
"Could not find installable ISAM."
I've downloaded and installed the correct version of "Microsoft Access database engine 2010".
Any help would be great
Re: Connecting to Excel 2010 64bit
If you are sure the provider is properly installed I would build my connection string as follows
Code:
Dim Builder As New OleDbConnectionStringBuilder With _
{ _
.DataSource = IO.Path.Combine(Application.StartupPath, "MyBook.xlsx"), _
.Provider = "Microsoft.ACE.OLEDB.12.0" _
}
Builder.Add("Extended Properties", "Excel 12.0;HDR=Yes;IMEX=1")
Console.WriteLine(Builder.ConnectionString)
Or set extended properties to
Code:
Builder.Add("Extended Properties","HDR=Yes;IMEX=1;Jet OLEDB:Engine Type=37")
Also try removing IMEX=1 and see what happens, it may connect but cause issues with your data and if so you might need to consider setting IMEX to another value 0 or 2 then again you might need to rethink your entire solution. Excel can be difficult at times and sometime down right refuse to work as expected with OleDb thus requiring early or late binding.
Re: Connecting to Excel 2010 64bit
Thanks for the info I'll try it out