excel+project redistribution

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,
i've a problem with a visual basic .net application that use excel.
In local everything is fine, but i've to install this application in
sometoher computer, and theese pc don't have the same version of excel
that i've :S

In the installation packet .net automatically add 2 files "EXCEL.exe"
and the dll associated with it "MS0.dll".
When i install my application theese 2 files are in the installation
folder, when i try to call excel i receive this error:

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): Formato
vecchio o libreria di tipo non valido.

at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object
o, Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack)

at pumadotnet.frmverifica.btnexcel_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)





************** 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

----------------------------------------

pumadotnet

Assembly Version: 1.0.2281.30902

Win32 Version: 1.0.2281.30902

CodeBase: file:///C:/Programmi/Puma/pumadotnet.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.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.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

----------------------------------------

Accessibility

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.573

CodeBase:
file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.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.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.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.




----------------------------------------------------
this is the code that i use to call excel:

Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
Dim oChart As Object
Dim cellAdress As String
Dim nomeFile As String

Dim i, j, cnt As Long


oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
nomeFile = pathpuma & "\db\Report.xlt"

oBook = oExcel.Workbooks.Open(FileName:=nomeFile)

oSheet = oBook.worksheets(1)
oSheet.Range("B5").Value = Qaria
oSheet.Range("B6").Value = Qfumi
oSheet.Range("B7").Value = Nt
oSheet.Range("B8").Value = Drecuperatore
oSheet.Range("B9").Value = De
oSheet.Range("B10").Value = H


For i = 0 To Nz - 1
oSheet.Range("B" & 13 + i).Value = i * H / Nz
oSheet.Range("C" & 13 + i).Value = Temp(1, i)
oSheet.Range("D" & 13 + i).Value = Temp(3, i)
oSheet.Range("E" & 13 + i).Value = Temp(2, i)
Next i
oBook.Sheets("Grafico").Select()
oChart = oBook.ActiveChart
oChart.SetSourceData(Source:=oSheet.Range("B12:E" & (13 + Nz)),
PlotBy:="Dati!B13:E" & 13 + Nz)


thanks in advance
marco

.



Relevant Pages

  • RE: Develop Office Application using .Net
    ... I am experimenting how to update the values of Excel application as its ... Dim dt As Data.DataTable ... MCP Year 2005, Philippines ... to install? ...
    (microsoft.public.office.developer.automation)
  • System.AccessViolationException on VS2005 and Microsoft.Office.Int
    ... Dim Nombre_Archivo As String = SaveFileDialog1.FileName ... Dim oWorksheet As Microsoft.Office.Interop.Excel.Worksheet ... ' Creamos un nuevo libro de trabajo de Excel. ... Win32 Version: 2.0.50727.42 ...
    (microsoft.public.excel.programming)
  • Re: Excel API
    ... Dim xls As Excel.Application ... I have to install MS Office on the client machine so can use or create excel ...
    (microsoft.public.vb.general.discussion)
  • Re: Project works on dev machine only
    ... Same versions of Excel, ... After I install the app, ... An Excel macro instantiates the class and shows a form. ... Dim c As DotNetApp.ClassName ...
    (microsoft.public.dotnet.languages.vb)
  • Running Excel .dll
    ... I will be running my DTS program and calling Excel Macro functions and ... performing Excel Cell Value checking on a server that does not have ... What is the name of the Excel dll I should install. ... dim xl_Spreadsheet ...
    (microsoft.public.sqlserver.dts)