The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
So you will face this error while using Ole Db for Excel Import in Asp.Net Webform or mvc.
So, the main reason behind this error is your system doesn't have the Microsoft Access Redestributable file installed. Basically, in the latest version of SQL( Sql Server 2019), these Ole DB Drivers are installed by default. But in older versions of SQL, we have to add Microsoft Access Ole Db Engine manually. You can download the file from
Solution 1: Click the link below and Download
2007 Office System Driver Data Connectivity Component
After installing this , you have to install the downloaded file and try to run your application. This must solve the issue. In case you still have issue you can check Solution 2
Solution 2: Click the link below and Download
Just open the link and click on
After clicking this you will see two checkboxes, select the 64-bit version if your system has 64-bit operating system and click next.
After clicking next, a file will start downloading, just install that file, and after the installation is completed.
Restart the system.
Access Database engine will not work without restarting. So, restart your system and try to run your application again. This time you will not face the same error. So, this is how you can solve the issue The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
Let us know if you face any difficulty. You can also comment if you face any problem.