I'm using VB .net to open an excel file for reading.
Everything works great when running on a machine with
Visual Studio .Net installed. However when I try to
distribute the application I get then following error when
the code accesses the excel file. I'm guessing it is
something similar to
http://support.microsoft.com/default.aspx?scid=kb;en-
us;810098#appliesto
However I tried this and still the same problem.
Any help will be appreciated.
thanks
************** Exception Text **************
System.NullReferenceException: Object reference not set to
an instance of an object.
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 geTool.mform.Button1_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(MouseEventAr gs
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)
************** 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/mscorl
ib.dll
----------------------------------------
geTool
Assembly Version: 1.0.1390.15453
Win32 Version: 1.0.1390.15453
CodeBase: file:///C:/ppo/geTool.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.50
00.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__b77a5c56
1934e089/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.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__b77
a5c561934e089/system.data.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__b77a
5c561934e089/system.xml.dll
----------------------------------------
AxInterop.OWC
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/ppo/AxInterop.OWC.DLL
----------------------------------------
Interop.OWC
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/ppo/Interop.OWC.DLL
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5
000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
Interop.Excel
Assembly Version: 1.4.0.0
Win32 Version: 1.4.0.0
CodeBase: file:///C:/ppo/Interop.Excel.DLL
----------------------------------------