Share via

How to Install Microsoft.ACE.OLEDB / AccessDatabaseEngine ?

Anonymous
2020-05-04T20:17:42+00:00

I am trying to read an Excel file in PowerShell. To do this, I am attempting to install AccessDatabaseEngine x86 version found here https://www.microsoft.com/en-us/download/details.aspx?id=54920 

I cannot install x64 because I have x64 Office installed. The AccessDatabaseEngine install seems to run fine on my Win10 machine. But, I still cannot connect to an Excel file. Also, I do not see ACE listed when I run this command in PowerShell,

(New-Object system.data.oledb.oledbenumerator).GetElements() | select SOURCES_NAME, SOURCES_DESCRIPTION

I have tried repairing the install, uninstalling / reinstalling, and rebooting.

I have tried the 2010 version of AccessDatabaseEngine too, but the results are the same.

This is the connection string I am trying to use:

"Provider=Microsoft.ACE.OLEDB.16.0;Data Source=$path;Extended Properties='Excel 8.0;'"

This is the error I get from PowerShell:

Exception calling "Open" with "0" argument(s): "The 'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine."

I have tried replacing 16 in the connection string with other version numbers.

How can I resolve this so that I can use ACE to query Excel?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-05-04T20:53:54+00:00

    I was able to connect using the connection string after installing the 32-bit version of ACE 2016. I had to run PowerShell 32-bit specifically because my machine is 64-bit with a 32-bit Office install. In the Windows Start menu, search for "Windows PowerShell (x86)."

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments