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?