"Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine" but I have it installed already

Raul Miranda picture Raul Miranda · Mar 2, 2019 · Viewed 9.4k times · Source

I have the same problem as others but (in this case) I have already installed that component.

UPDATE: I have Windows 10 x64, Office 2016 x64, MS Access Database Engine 2016 x64. Is a ASP.NET .NET Framework 4.5 target AnyCPU Visual Studio Solution (Web Site project).

The image is just for demonstrate that I have installed this OLEDB provider.

Provider is registered!

My code is:

"Provider=Microsoft.ACE.OLEDB.16.0;Data Source={0};Extended Properties='Excel 12.0 Xml;HDR={1}'"
cmdExcel.Connection = connExcel
connExcel.Open()

The last line break and cause the Exception.

Answer