从Excel 2013降级到2010(即除去2013年和安装2010),当我尝试从我的外接访问Excel OM这样之后:例外,从2013年降级到2010
if (this.Application.ActiveWorkbook == null)
{
return;
}
我得到以下异常:
Unable to cast COM object of type 'System.__ComObject' to interface type '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: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
我采取了以下措施来解决这个问题,但没有工作过:
- 修复Office安装
- 卸载和重新
- 清除了所有的办公室从注册表15个引用
- 重新注册Excel文件( “C:\ Program Files文件(x86)的\的Microsoft Office \ OFFICE14 \ EXCEL.EXE”/o)
然而,似乎没有任何工作。有什么我失踪或我真的必须擦拭机器?
编辑: 我的猜测是,仍有进来注册表冲突,但我不知道在哪里...
谢谢进阶!
好极了! 2010年至2007年的降级也完美结合! – MiBol 2015-09-08 16:10:42