使用Microsoft Office电子表格将Excel工作表嵌入VB.Net表单时出错

时间:2013-12-27 13:49:14

标签: asp.net vb.net excel

我正在使用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。

1 个答案:

答案 0 :(得分:-1)

看起来您可以进行拖放,单击确定,然后重建并尝试再次拖放。 如果这不起作用,那么您可以从MS Here

查看本指南
相关问题