"Microsoft Access Database Engine" error when launching AutoCAD Electrical + Issues writing Excel files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Last night my PC had some Windows & Office 365 updates and when I started AutoCAD Electrical 2022 this morning I got the following message
Getting it working again was not a smooth process, so I'm documenting it here in case anyone else has similar issues
I clicked the "Troubleshoot ..." link and followed the instructions, downloading the Microsoft Access Database Engine 2016 Redistributable, and installing it. AutoCAD Electrical 2022 started up properly again
Everything was fine until I used an add-in that uses Excel Interop to read/write XLS files, which crashed out with the following error
"Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'"
Most suggestions from these forums & Google involve repairing Office, and reinstalling the Access Database Engine 2016, which would get me back to the same point, but would not fix the Excel issue
Using a standalone program to test Excel Interop, I found that uninstalling the Access Database Engine & repairing Office 365 would fix Excel Interop, & that it was the Access Database Engine that was breaking things
Further searching came up with this document from Microsoft - https://docs.microsoft.com/en-us/office/troubleshoot/access/cannot-use-odbc-or-oledb - which explains the issue, and offers two possible solutions.
These are Microsoft 365 Access Runtime, which did not work, or Microsoft Access 2013 Runtime which allowed me to use AutoCAD Electrical 2022
In summary, these are the steps to follow if you are having issues reading & writing Excel files in AutoCAD Electrical
- Uninstall all versions of Microsoft Access Runtime
- Repair Office 365 (a quick repair worked fine for me)
- Download Microsoft Access 2013 Runtime (64 bit) from here
https://www.microsoft.com/en-us/download/details.aspx?id=39358 - Install Microsoft Access 2013 Runtime
Disclaimers
I've only tested this with AutoCAD Electrical 2022 & Excel Version 2203 Build 15028.20204
I've only tested it on my computer
I've done a quick check with AutoCAD Electrical 2021 and it seems OK
This has caused me a whole day's worth of pain, but hopefully it will help someone else out