【导出Excel】Error accessing COM components

Unable to cast COM object of type'System.__ComObject' tointerface type 'Microsoft.Office.Core.IRibbonUI'.This operation failed because theQueryInterface call on the COM componentfor theinterface with IID'{000C03A7-0000-0000-C000-000000000046}' failed due to the following error:  could not be found.(Exceptionfrom HRESULT:0x80030002(STG_E_FILENOTFOUND)).  

at Microsoft.Office.Core.IRibbonUI.InvalidateControl(StringControlID)

 

 

Problem found!

I have previous installed the Office 2010, so there are some inconsistence on Windows Registry. To fix, open theregedit and find for the CLSID on the error.

Do you will find something like that for the second error:

HKEY_CLASSES_ROOT\Interface\{00020970-0000-0000-C000-000000000046}

With the subkeys:

  • ProxyStubClsid
  • ProxyStubClsid32
  • TypeLib

Take note of the (Default) and Version values inside ofTypeLib.

Now find the node bellow, using the (Default) value as <TypeLib ID>.

HKEY_CLASSES_ROOT\TypeLib\ <TypeLib ID> \

As child of this elements you will find more than one element, one of then is theVersion of the first registry. If you inspect the others elements, you will find that they point to nothing.Remove the others!!! It's solved!

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值