I am working on my local machine. I setup a web application in vs 2010 and read an excel spreadsheet via oledb like so:
var sConnectionString = "Provider =Microsoft.ACE.OLEDB.12.0;
"Data Source=" + HttpContext.Current.Server
Return Addresses.xlsx") + ";" +
"Extended Properties =\"Excel 12.0 Xml;HDR=YES;\"";
// Create connection object by using the preceding connection string.
var objConn = new OleDbConnection(sConnectio
// Open connection with the database.
It worked flawlessly. I setup a website (not application) in vs2010 running on localhost. I run the exact same code and get the following error when i run objConn.Open();:
provider is not registered on the local machine.
Im using the same machine, I have office 2010 32-bit version installed (my machine is a 64-bit). I have downloaded and ran AccessDatabaseEngine.exe downloaded from this site http://www.microsoft.com/download/en/confirmation.aspx?displayLang=en&id=23734
, but that didnt work either. Why can I read an excel spreadsheet via oledb when I create a web application, but cant read it when I create a website?