I have a C# application using Office.Interop.Excel which worked fine on Windows 10 and stopped working after upgrading to Windows 11. Any idea on how to fix this?
Asked
Active
Viewed 1,305 times
2
-
Thanks for your help. I checked the registry and I didn't have versions 1.7 or 1.8, only 1.9. I left it as is. Following the comments on the first link you provided, I decided to do a simple Office 365 fast repair and this solved the problem. Things seem to be working now. – user1941679 Nov 18 '21 at 14:05
1 Answers
0
It seems your Windows registry keys were corrupted while upgrading to Windows 11. I'd recommend repairing MS Office applications for restoring the Windows registry keys. This also can be caused by installing a newer version of Microsoft Office, and then removing it and installing an older version instead. There are other ways this could happen.
You can try editing the keys manually as described below:
Start-->Run --> regedit --> HKEY_CLASSES_ROOT-->TypeLib-->{00020813-0000-0000-C000-000000000046} --> 1.8/1.7 - Delete the old one, but don't forget to export for any emergency cases.
If it was not successful, you can try to repair your Office from the control panel. Then, try again. If the problem still exists, you can completely uninstall, reboot, and then reinstall Office.
Here are some similar threads you can refer to:
- unable to cast COM object of type 'microsoft.Office.Interop.Excel.ApplicationClass' to 'microsoft.Office.Interop.Excel.Application'"
- How to solve “Unable to cast COM object of type Microsoft.Office.Interop.Excel.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Excel._Application’”
- How to solve “Unable to cast COM object of type Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'”

Eugene Astafiev
- 47,483
- 3
- 24
- 45
-
Should have commented here...Thanks for your help. I checked the registry and I didn't have versions 1.7 or 1.8, only 1.9. I left it as is. Following the comments on the first link you provided, I decided to do a simple Office 365 fast repair and this solved the problem. Things seem to be working now. – user1941679 Nov 18 '21 at 14:06
-