CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2002
    Posts
    47

    I want to create a graphic in Excel with vb net

    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
    Alexandre

  2. #2
    Join Date
    Oct 2002
    Location
    Växjö, Sweden
    Posts
    225
    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

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

    /Leyan

  3. #3
    Join Date
    Apr 2002
    Posts
    56
    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..
    rajtofar

  4. #4
    Join Date
    Oct 2002
    Location
    Växjö, Sweden
    Posts
    225

  5. #5
    Join Date
    Apr 2002
    Posts
    56
    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.
    rajtofar

  6. #6
    Join Date
    Oct 2002
    Location
    Växjö, Sweden
    Posts
    225
    Try this:

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured