我遇到了一个非常奇怪的问题, 我在一台电脑里面做了一个WINFORM的APPLICATION ,里面引用了excel.dll和office.dll.在这台电脑当中编译成功运行也正常,但当我把所有文件(包括相应的DLL文件) 复制到另外一台电脑当中,当读取EXCEL 的时候,就会提示如下错误.我已经尝试编译过许多版本的EXCEL.DLL ,问题依然存在,请大家帮忙看看啊.参考:有问题的电脑的系统 OFFICE XP SP3, WINDOWS2000 SP4.错误信息:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80028018): Old format
or invalid type library.
  at Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object
ReadOnly, Object Format, Object Password, Object WriteResPassword,
Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter,
Object Editable, Object Notify, Object Converter, Object AddToMru,
Object Local, Object CorruptLoad)
  at BankInfoSystem.Form1.Initial_Excel(String Filename)
  at BankInfoSystem.Form1.menuItem4_Click(Object sender, EventArgs e)
  at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
  at System.Windows.Forms.MenuItemData.Execute()
  at System.Windows.Forms.Command.Invoke()
  at System.Windows.Forms.Control.WmCommand(Message& m)
  at System.Windows.Forms.Control.WndProc(Message& m)
  at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  at System.Windows.Forms.ContainerControl.WndProc(Message& m)
  at System.Windows.Forms.Form.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)
************** Loaded Assemblies **************
mscorlib
   Assembly Version: 1.0.5000.0
   Win32 Version: 1.1.4322.2032
   CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
BankInfoSystem
   Assembly Version: 1.0.2217.33076
   Win32 Version: 1.0.2217.33076
   CodeBase: file:///C:/Documents%20and%20Settings/SZP001/Desktop/Release/BankInfoSystem.exe
----------------------------------------
System.Windows.Forms
   Assembly Version: 1.0.5000.0
   Win32 Version: 1.1.4322.2032
   CodeBase: file:///c:/winnt/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.2032
   CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
   Assembly Version: 1.0.5000.0
   Win32 Version: 1.1.4322.2032
   CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
FlexCell
   Assembly Version: 1.6.2.0
   Win32 Version: 1.6.2.0
   CodeBase: file:///C:/Documents%20and%20Settings/SZP001/Desktop/Release/FlexCell.DLL
----------------------------------------
System.Data
   Assembly Version: 1.0.5000.0
   Win32 Version: 1.1.4322.2032
   CodeBase: file:///c:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
Microsoft.VisualBasic
   Assembly Version: 7.0.5000.0
   Win32 Version: 7.10.6001.4
   CodeBase: file:///c:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Xml
   Assembly Version: 1.0.5000.0
   Win32 Version: 1.1.4322.2032
   CodeBase: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Excel
   Assembly Version: 1.4.0.0
   Win32 Version: 1.4.0.0
   CodeBase: file:///C:/Documents%20and%20Settings/SZP001/Desktop/Release/Excel.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.