繁体   English   中英

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

[英]Error while Embedding Excel sheet into VB.Net Form using Microsoft office spread sheet

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

看来您可以执行拖放操作,单击“确定”,然后重新构建并尝试再次拖放。 如果不工作,那么你可能会检查出从MS本指南这里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM