How to Fix Excel COM Library Not Registered After Microsoft 365 Updates
Question details
A C# application fails to open Excel due to a COM casting error (0x8002801D) indicating an unregistered type library after a Microsoft 365 update.

- Product
- Microsoft 365 / Microsoft Excel
- Device & OS
- not provided
- Scenario
- Running a custom C# application that interacts with Microsoft Excel via COM interop following a recent Office update.
- Observed behavior
- The application throws a COM casting error with HRESULT 0x8002801D. Running a Quick Repair on Office only resolves the issue temporarily before it returns.
Ensure you have administrative privileges on your computer, as repairing Microsoft 365 installations requires admin rights. Save and close all open Office applications before proceeding.
Perform an Online Repair for Microsoft 365
Use the Online Repair tool for a comprehensive fix that completely restores missing Excel COM registrations permanently.
A Quick Repair only replaces corrupted files and performs basic registry checks without a complete reinstallation of components. This is why background updates or system checks may revert your fix. An Online Repair performs a thorough reinstallation of the COM registrations, ensuring stable interop functionality.
Right-click the Windows Start menu and select 'Installed apps' (or 'Apps and Features' on older Windows versions).
Scroll down or use the search bar to find 'Microsoft 365' or your specific version of Microsoft Office in the application list.
Click the three dots (or right-click) next to the application and select 'Modify'. Click 'Yes' if prompted by User Account Control.
In the repair dialog box, select the 'Online Repair' option and click 'Repair'. Follow the on-screen prompts.
Once the repair process is fully completed, restart your computer to ensure all registry changes and COM library registrations take effect.

Switch to WPS Office for a Stable and Lightweight Experience
Tired of recurring Microsoft 365 update errors breaking your workflows and applications? WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office. Enjoy a familiar user interface, seamless migration, and excellent stability without heavy system overhead.
- 1. Download the Installer: Visit the official WPS Office website and click the 'Free Download' button.
- 2. Install WPS Office: Run the downloaded installer and follow the quick on-screen instructions to set up the software.
- 3. Open Your Spreadsheets: Launch WPS Spreadsheet and seamlessly open your existing Excel files to continue your work without interruptions.

Frequently Asked Questions
What does HRESULT 0x8002801D mean when connecting to Excel?
This error code translates to 'Library not registered' (TYPE_E_LIBNOTREGISTERED). It occurs when the Windows registry is missing the correct reference or path to the Excel COM type library, frequently caused by incomplete updates, leftover registry keys from older versions, or corrupted Office installations.
Why does Quick Repair only fix the COM library temporarily?
Quick Repair checks for basic corrupted files and standard registry keys but does not perform a deep reinstall. Subsequent background updates or automated system maintenance may revert the quick fix. Online Repair performs a complete reset of the COM registrations, providing a permanent solution.
Can I manually register the Excel COM library instead of doing a full repair?
While it is possible for advanced users to force Excel to re-register its COM components by running 'excel.exe /regserver' via the Windows Run dialog or Command Prompt, an Online Repair is officially recommended to ensure all related dependencies and Microsoft 365 registry keys are properly aligned.




