the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine while reading a excel file in c#

Hamid Reza picture Hamid Reza · Oct 28, 2015 · Viewed 29k times · Source

I am reading an excel file and I want to access its contents. I am using this connection string:

connectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0}; Extended Properties=Excel 12.0;", Server.MapPath(fileName));

But I see this error:

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

My server is running on 64-bit operating system. I have installed Microsoft Office Professional Plus 2010(32-bit) and Microsoft Access database engine 2010 on it.

What is the problem?