【发布时间】:2013-12-27 13:49:13
【问题描述】:
我正在使用 Visual Studio 2012 并创建一个 VB.Net Windows 窗体应用程序,而我正在尝试将 Excel 工作表数据嵌入到表单中。
我已经安装了 Office Web 组件 11。在拖放 Microsoft Office 电子表格项目时,它显示以下错误
导入 ActiveX 控件失败。请确保已正确注册。 PFB 快照。
*构建控制台:)*
------ Build started: Project: WindowsApplication7, Configuration: Debug Any CPU ------
COM Reference 'OWC11' is the interop assembly for ActiveX control 'AxOWC11' but was marked to be linked by the compiler with the /link flag. This COM reference will be treated as a reference and will not be linked.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "7c0ffab0-cd84-11d0-949a-00a0c91110ed" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): error MSB3303: Could not resolve COM reference "0002e558-0000-0000-c000-000000000046" version 1.0. Object reference not set to an instance of an object.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "7c0ffab0-cd84-11d0-949a-00a0c91110ed" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): error MSB3303: Could not resolve COM reference "0002e558-0000-0000-c000-000000000046" version 1.0. Object reference not set to an instance of an object.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
注意:我可以在我的系统中使用 VBA 表单嵌入 excel 工作表。 我正在使用 Microsoft 2010。
【问题讨论】: