I built an application from Visual Studio 2012 that uses connection string to open Excel:
ExcelConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source = " + fname + "; Extended Properties='Excel 12.0; HDR=No;IMEX=1'", and set target Framework 4.0;
My local machine had installed Microsoft Office 2007 and 2010 32 bit; and my web server has installed Excel 2010 64 bit.
My application runs fine in the Visual Studio in the local machine and also in local IIS, but when I deploy to the web server, run from there, it has an Error: "Microsoft ace oledb 12.0 not registered on local machine"
Then in the server, I uninstalled the Excel 2007 32 bit and installed Excel 2010 64 bit, then that worked.
Then I try to do the same to my local machine, I uninstalled the Microsoft Office 2007 and 2010 32 bit and installed Excel 2010 64 bit, now I ran the application in the Visual studio, it does not work any more.
I wonder why in my local machine I have to have 32 bit Excel and the server have to have 64 bit Excel to make the application work in both place.