【问题标题】:Error while Embedding Excel sheet into VB.Net Form using Microsoft office spread sheet使用 Microsoft Office 电子表格将 Excel 工作表嵌入 VB.Net 表单时出错
【发布时间】: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。

【问题讨论】:

    标签: asp.net vb.net excel


    【解决方案1】:

    看起来您可以进行拖放操作,单击“确定”,然后重建并再次尝试拖放。 如果这不起作用,那么您可以查看 MS Here 的本指南

    【讨论】:

    • 我已经尝试了很多次重建它..但没有运气..我现在在帖子中添加了一些日志。请看一下
    • 您的“解决方案资源管理器”中有错误的参考吗?
    • 我没有在解决方案资源管理器中添加任何引用。这是一个问题
    • COM 参考 'OWC11' 是 ActiveX 控件 'AxOWC11' 的互操作程序集,但被编译器用 /link 标志标记为链接。此 COM 引用将被视为引用,不会被链接。
    • 如何为此运行 Regsvr32 ?
    猜你喜欢
    • 2023-03-28
    • 2011-06-13
    • 1970-01-01
    • 1970-01-01
    • 2013-08-22
    • 1970-01-01
    • 2018-09-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多