[英]Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A
I want to communicate with Excel, so im using the 'Microsoft.Office.Interop.Excel 16.0' DLL. 我想与Excel通信,所以即时通讯使用的是“ Microsoft.Office.Interop.Excel 16.0” DLL。 Tho im getting the expection:
我得到了期望:
System.InvalidCastException: 'Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'.
System.InvalidCastException:'无法将类型为'Microsoft.Office.Interop.Excel.ApplicationClass'的COM对象转换为接口类型'Microsoft.Office.Interop.Excel._Application'。 This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL.
此操作失败,因为对IID为“ {000208D5-0000-0000-C000-000000000046}”的接口的COM组件上的QueryInterface调用由于以下错误而失败:加载类型库/ DLL出错。 (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).'
(来自HRESULT的异常:0x80029C4A(TYPE_E_CANTLOADLIBRARY))。
Im using office 365 but also installed Excel 2013 just to check if this works. 我正在使用Office 365,但也安装了Excel 2013只是为了检查它是否有效。
Could anyone tell me why this expection is being thrown and how to fix it? 谁能告诉我为什么会抛出这种期望以及如何解决它?
Thanks in advance 提前致谢
Quick Repair the 'Microsoft Office 365' to get rid of the exception. 快速修复“ Microsoft Office 365”以摆脱异常。
Control Panel -> Programs and Features-> Microsoft Office 365 -> Click Change(Right click) -> Select Quick Repair. 控制面板->程序和功能-> Microsoft Office 365->单击更改(右键单击)->选择快速修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.