在使用axSpreadSheet时OWC11 组件初始化错误的解决

一、发生错误的环境

  1. Vista/XP/Windows 2003
  2. 安装了Office2007;
  3. Visual Studio 2005/2008

二、错误现象

  1. 在Visual Studio 2005开发环境中
    1. 在设计时,可以顺利的将axSpreadSheet控件拖动到Form窗口内,可以正常进行控件的相关操作;
    2. 在开发环境中直接运行程序时,多数情况下,axSpreadSheet能够正常工作。
    3. 直接运行编译后的文件将出现下面的错误:

 

  1. 在Visual Studio 2008开发环境中
    1. 在设计时,将axSpreadSheet控件向Form窗口拖动时,出现下面的错误:

                  控件axmicrosoft.office.interop.owc11.axspreadsheet在设计器中引发了一个未处理的异常。

                  尝试读取或写入受保护的内存。这通常指其他内存已经损坏。

                  system.accessviolationexception:尝试读取或写入受保护的内存。

                  system.windows.forms.unsafenativemethods.ioleinplaceobject.uideactivate();

                  system.windows.forms.AxHost.uideactivate();

                  system.windows.forms.AxHost.onlostfous(eventargs e);

 

三、解决过程

  1. 下载Office 2003 Add-in: Office Web Components (owc11 COM)并安装该组件;
  2. 下载 Microsoft Office 2003 Web Components Service Pack 1 (SP1) for the 2007 Microsoft Office System,并安装该文件。

问题解决。

  • 0
    点赞
  • 0
    评论
  • 1
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. 收藏 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [COMException (0x80040154): Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154.] GraphPage.Page_Load(Object sender, EventArgs e) +1097 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 请大家帮忙 谢谢 Server Error in '/' Application. -------------------------------------------------------------------------------- Retrieving the COM class factory for component with CLSID {0002E55D-0000-0000-C000-000000000046} failed due to the following error: 80040154.
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

junzheng

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值