简体   繁体   English

升级到 Windows 11 后,Office Interop 停止工作

[英]Office Interop stopped working after upgrade to Windows 11

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? 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?

错误信息

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.升级到 Windows 11 时,您的 Windows 注册表项似乎已损坏。我建议修复 MS Office 应用程序以恢复 Windows 注册表项。 This also can be caused by installing a newer version of Microsoft Office, and then removing it and installing an older version instead.这也可能是由于安装较新版本的 Microsoft Office,然后将其删除并安装较旧版本而引起的。 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.如果不成功,您可以尝试从控制面板修复您的 Office。 Then, try again.然后,再试一次。 If the problem still exists, you can completely uninstall, reboot, and then reinstall Office.如果问题仍然存在,您可以完全卸载、重新启动,然后重新安装 Office。

Here are some similar threads you can refer to:以下是一些您可以参考的类似主题:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM