LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default visual basic .net and excel problem

hi,
i'm a newbie for visualbasic .net and excel so i hope that you can
suggest me some way to solve my problem.
i'll try to explain:
then 've created my application in visual basic.net, a feature is that
i i write on a excel template some data and after i can view a graph
in local i don't have any problem, but if i try to install in other pc
i reach (for now) 2 error:

System.Runtime.InteropServices.COMException (0x80028018): Old format or
type library not valid.
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(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(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)

in this case there's a different version of excel installed.

or i find this:
Cannot create ActiveX component

in this case there's no excel installed.

So i've noted that in the setup packet of my application, .net
automatically include "Excel.exe", "MS0.dll" ,
"Interop.Excel.dll","Interop.Microsoft.Office.Core .dll"

and i would know if with only this file i can use my .net and excel
application.
Or could you suggest me some solution?

thanks
cappa

This is the code that i use:
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)

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML downlaod through visual basic - tag problem Andrew Yates Excel Programming 1 March 7th 06 12:40 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
Visual Basic problem Carol Lutz Excel Programming 3 August 20th 03 04:03 PM
Visual Basic Problem with Chr(34) Tom Ogilvy Excel Programming 0 August 6th 03 01:20 PM
Visual Basic Problem with Chr(34) Chip Pearson Excel Programming 0 August 6th 03 01:16 PM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"