I'm trying to get data from an Excel file on a button click event. My connection string is:
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\source\\SiteCore65\\Individual-Data.xls;Extended Properties=Excel 8.0;";
When I click on the button, I got the following error:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
I have no clue how to fix this. My operating system is Windows 7.
If you're using 64-bit but still having problem even after installing AccessDatabaseEngine, see this post, it solved the problem for me.
i.e. You need to install this AccessDatabaseEngine
I was able to fix this by following the steps in this article: http://www.mikesdotnetting.com/article/280/solved-the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine
The key point for me was this:
When debugging with IIS,
"Use the 64 bit version of IIS Express for websites and projects"
After checking that option, then setting the platform target of my project back to "Any CPU" (i had set it to x86 somewhere in the troubleshooting process), i was able to overcome the error.
A 64-bit version of the 'Microsoft Access Database Engine 2010 Redistributable' that will allow you to use the 'Microsoft.ACE.OLEDB.12.0' provider is available here:
http://www.microsoft.com/en-us/download/details.aspx?id=13255
If you use the download from the accepted answer, you will need to build for x86, as pointed out by @backtestbroker.com.
If you are debugging a web project, just make sure IIS Express is running either in 32 or 64 bits depending on your project settings.
Goto
and from there check (or uncheck) the 'Use 64 bit version of IIS Express...'
also can try these steps
In the SQL Server, 1.Open one data base 2.Clic in the option 'Server Obtect' 3.Clic in 'Linked Servers' 4.Clic in 'Providers' 5.Clic Rigth in 'Microsoft.ACE.OLEDB.12.0' 6.Uncheck all the options and close
depending on the app(32/64bit) using the connection you could just install
Summary:
check your providers with the powershell-command from both 32 and 64bit shell:
and you will see which provider your system can use
the long story: the strings can be found with http://live.sysinternals.com/strings.exe
eg. on a 64bit System with 32bit drivers installed
even in the upcoming office 2016
you will find the strings
Microsoft.ACE.OLEDB
Microsoft.ACE.Oledb.12.0
the Office 2013 comes also with csi.dll
which contains the "Microsoft.ACE.OLEDB.15.0"
and Office 2016
which has the "Microsoft.ACE.OLEDB.16.0" version