The solution that you will find everywhere for this error is to install the Microsoft Access Database Engine. If you have the 32bit version of office, then you have to install the 32 version of Microsoft.ACE.OLEDB.12.0. The same applies for 64th version.
But, for me it didn’t worked. So I found on some blogs that I have to install the both versions (32 and 64bit) of Microsoft.ACE.OLEDB.12.0. I started by installing the 64-bit Microsoft Access Database Engine 2010 Redistributable. Normally windows will not let you do that windows will pop up this screen:
There are two options for getting the other version installed.
The 2007 Access database engine can read the same format, but didn’t have a 64-bit install. It doesn’t have the check to see what other products are on your machine and can co-exist peacefully with the 64-bit 2010 Access engine.
Note: A helpful commenter has informed me that for Access 2016 the switch is /quiet rather than /passive.
This is how I solved this error: Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine. If it helped you as well please share it.