strdbConn = "Provider=Microsoft.Jet.OLEDB. 4.0;" + "Data Source=" +
strFilePath
+ "; Jet OLEDB:Engine Type=5;"
+ "Extended Properties=Excel 8.0;";
Now I had windows 7 x64 bit and similarly Office 2010 professional plus and the above connection string didn't work.
Resolution:
Finally you need to use the following connection string in here:
strdbConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strFilePath +";Extended Properties=Excel 12.0;";
And the error was resolved!
No comments:
Post a Comment