I have a program that imports data from Excel into a dataset. To connect to Excel I use the following code...
return new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" +
fileName + "; Jet OLEDB:Engine Type=5;"+ "Extended Properties=\"Excel 8.0;\"");
I just got a new computer with Excel 2010 and now the connection attempt fails and throws an exception saying The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
Is this because the new version of Excel needs a different connection string? Has anyone run into this?
EDIT: Actually I just read somewhere that using the System.Data.OleDbClient class does not require Excel to even be installed on the computer. So my problem probably has nothing to do with Excel but rather with the Microsoft.Jet tool. My computer is running Windows7 64 bit. Shouldn't that be installed already?