Click to See Complete Forum and Search --> : I want to create a graphic in Excel with vb net


gibea00
October 23rd, 2002, 08:17 AM
Hi Everyone

My data are in a Access table and i want to use this data to create a graphic in Excel. How can i call Excel in vb net who will create automaticly a graphic using the data in the access table?

Thanks a lot

Alex

Athley
October 23rd, 2002, 12:42 PM
Theres tons of articles written on the subject by MS, no nee to dig deep for us. Start here:

Automate Microsoft Excel from Visual Basic .NET (http://premier.microsoft.com/premier/library/default.aspx?path=/premier/kb/en-us/Q301/9/82.ASP?KBID=Q301982)

The link under the header "References" will take you further.

/Leyan

rajtofar
October 26th, 2002, 06:25 AM
Related to this ... I have a problem.
I've made an application in VB .NET that opens an excel file and writes data into it from a flexgrid... and has some seven different forms to view that data.
My problem is...
THe excel objects that are opened by the code... remain open...
i.e; they keep showing in my task manager...
and I have to end process each of them.

To close the object I've used.
xlsheet.workbooks.close()
xlsheet = nothing

Can someone help??
Thnks..

Athley
October 27th, 2002, 12:36 PM
Office Application Does Not Quit After Automation from Visual Studio .NET Client (http://support.microsoft.com/default.aspx?scid=KB;EN-US;q317109&)

/Leyan

rajtofar
October 27th, 2002, 11:29 PM
Thnks for the reply. That's exactly related to my prob.
I've tried doing this also. But for some matter it still doesn't work.
Is there some way that we can check if there is an excel object still showing in the task manager and run a loop to end all the excel objects from it ?

F.Y.I : I am using an existing xlsheet and opening and closing the same one for the data display and input.

Thanks again.

Athley
October 28th, 2002, 01:08 AM
Try this:

Dim ps() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName("Excel")
Dim p As Process
For Each p In ps
p.Kill()
Next


/Leyan