Microsoft Excel 12.0对象库

时间:2010-08-15 17:30:04

标签: c# excel

我使用microsoft互操作库Microsoft Excel 12.0对象库

构建了一个应用程序

应用程序只是在excel表中写入价格,然后向用户显示excel表

客户端一直收到错误

有关调用的详细信息,请参阅此消息的结尾 实时(JIT)调试而不是此对话框。

例外文字:

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {50E4D830-B0BD-4DB5-94DB-CC5AB547CDA9} failed due to the following error: 80040154.
   at FXCM.Order2Go.Examples.RatesExampleForm.Login()
   at FXCM.Order2Go.Examples.RatesExampleForm.buttonLogin_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

已加载的程序集:

mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

RatesExample
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/examples/Examples/CS/RatesExample/bin/Release/RatesExample.exe

System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

Interop.FXCore
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/examples/Examples/CS/RatesExample/bin/Release/Interop.FXCore.DLL

JIT调试:

  

要启用实时(JIT)调试,请使用.config文件   应用程序或计算机(machine.config)必须具有   在system.windows.forms部分中设置的jitDebugging值。   还必须使用调试编译应用程序   启用。

     

例如:

<configuration>
  <system.windows.forms jitDebugging="true" />
</configuration>
     

启用JIT调试时,任何未处理的异常   将被发送到计算机上注册的JIT调试器   而不是由此对话框处理。

1 个答案:

答案 0 :(得分:3)

这看起来像使用GUID 50E4D830-B0BD-4DB5-94DB-CC5AB547CDA9而不是Excel 12加载COM组件时出现问题。尝试安装/注册似乎是“fxcore”的东西,Orders2Go的某些部分?