在程序中用到了Excel输出功能,但在安装运行后出现了以下错误,请问怎么解决啊?
System.IO.FileNotFoundException: File or assembly name Interop.Excel, or one of its dependencies, was not found.
File name: "Interop.Excel"
at fdsystem.output.toexcel(DataView dss, String str)
at fdsystem.ac_co_stdreport.button3_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.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)=== Pre-bind state information ===
LOG: DisplayName = Interop.Excel, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = C:\Documents and Settings\administrator\桌面\
LOG: Initial PrivatePath = NULL
Calling assembly : fdsystem, Version=1.0.2368.15583, Culture=neutral, PublicKeyToken=null.
===LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Interop.Excel, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel/Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel.EXE.
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel/Interop.Excel.EXE.************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
fdsystem
Assembly Version: 1.0.2368.15583
Win32 Version: 1.0.2368.15583
CodeBase: file:///C:/Documents%20and%20Settings/administrator/桌面/fdsystem.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.For example:<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
System.IO.FileNotFoundException: File or assembly name Interop.Excel, or one of its dependencies, was not found.
File name: "Interop.Excel"
at fdsystem.output.toexcel(DataView dss, String str)
at fdsystem.ac_co_stdreport.button3_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.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)=== Pre-bind state information ===
LOG: DisplayName = Interop.Excel, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = C:\Documents and Settings\administrator\桌面\
LOG: Initial PrivatePath = NULL
Calling assembly : fdsystem, Version=1.0.2368.15583, Culture=neutral, PublicKeyToken=null.
===LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Interop.Excel, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel/Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel.EXE.
LOG: Attempting download of new URL file:///C:/Documents and Settings/administrator/桌面/Interop.Excel/Interop.Excel.EXE.************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
fdsystem
Assembly Version: 1.0.2368.15583
Win32 Version: 1.0.2368.15583
CodeBase: file:///C:/Documents%20and%20Settings/administrator/桌面/fdsystem.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.For example:<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
解决方案 »
- 单元格计算,使用了while语句......
- C# arraylist小问题
- 键盘驱动按钮,怎么搞?
- C#工程 windows control library 生成的dll能否被asp.net调用
- C#.net中月份控件问题
- datagridview不能刷新问题--winform
- 简单问题
- 用.net2010开发的winform,如何才能生成脱机安装的setup.exe程序?
- mscomm如何接收9位数据
- 给个思路,如何禁止鼠标在整个系统中的点击?(不仅仅是本身这个程序)
- 大虾快来帮帮,WEB服务在VS2005下面难道是只能编译成APP_code.dll这个名称吗?
- 关于TreeView中第2列显示图标的问题
机器上安装excel了吗?