I am upgrading my hardware to the new Windows Surface Pro Copilot+ which is a Qualcomm Snapdragon X Elite processor running Windows 11 for ARM. The PS scripts seem to run fine in collecting the data files, but generate an error when trying to build the CSV files. The first part of the error message(s) I get are:
Any help would be greatly appreciated.
Comments
Exception calling "Open" with "0" argument(s): "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
The top results seem to be about 32-bit OLEDB vs 64-bit OLEDB. I believe if you use 64-bit PowerShell, you need the 64-bit OLEDB and vice-versa.
https://stackoverflow.com/questions/8588960/determine-if-current-powershell-process-is-32-bit-or-64-bit
1. Determined version of PowerShell - followed directions on link you provided above as well as from https://howtogeek.com/731885/how-to-check-the-powershell-version-in-windows-10/. This indicated I am running the 64-bit version of PowerShell version 5 on ARM64 architecture:
2. Based on directions from "TT's" reply at https://learn.microsoft.com/en-us/answers/questions/1658052/download-link-for-microsoft-ace-oledb-12-0, downloaded and installed 64-bit version (from the Wayback machine links in TT's response) and re-started my computer. Got the same error message when running the PS scripts.
3. Uninstalled the application installed in Step 2 above and thought I would try the 32-bit version (what the heck). Repeated Step 2 downloading, installing 32-bit version, re-started computer, ran PS scripts - same error message.
4. Noticed LucyChenMSFT-4874's response to original post in Step 2 above, indicating link for Microsoft.ACE.OLEDB.16.0 (which appears to be an upgrade to OLEDB.12), so thought I would give that a try. So I uninstalled 32-bit version installed in Step 3 above, downloaded and installed 64-bit version of OLEDB.16.0 (downloaded from https://microsoft.com/en-us/download/details.aspx?id=54920). Re-started my computer and ran the PS scripts - same error message
5. Since that didn't work either, thought I would try the 32-bit version of OLEDB.16.0 from same link in Step 4 above. Uninstalled 64-bit version, downloaded and tried to install 32-bit version. Got the following error message:
Any other thoughts on next steps?
From any other device, they only need to read the data. This can work over the internet too if you secure everything.
In it, a user by the name of "Neally" suggests (italics added) "Why are you using OLEDB to connect to Excel? I’d recommend to re-write your code to use the ImportExcel module by Doug Finke" and links to that module at https://github.com/dfinke/ImportExcel
This looks more complicated that I am able to do, but would be interested in your thoughts on it as a possible solution/alternative.
"In summary, the error occurs because the Microsoft.ACE.OLEDB.12.0 provider is not registered or available for ARM architecture. Exploring alternative data access methods or running your script in an x86/x64 environment might be necessary."
To use these scripts you would have to:
1. Rename script GetExcelSrcData.ps1 to GetExcelSrcData3.ps1
2. Rename script GetExcelSrcData2.ps1 to GetExcelSrcData.ps1
3. As per @gsbaker instructions included in the script - you need to start PowerShell in admin mode and install ImportExcel module by executing command:
Install-Module -Name ImportExcel -Scope AllUsers
4. Test extracts and confirm all works OK.
We will consider promoting @gsbaker script to "main" branch in the future after we will consider all implications.
@gsbaker - Thank you again for sharing your script with us!