Excel Issues

  • 9 years ago

    I have a referrence to Excel 12.0 Object Library in my application. I have made the visible set to false for Excel and doing all my work. When iam trying to terminate the excel while application termination it is closing all the other opened excel workbooks.

    Please give a solution.
    The code is somewhat like this:

    Try
    Dim pProcess As Process
    exlHandle = oexcel.Hwnd
    GetWindowThreadProcessId(exlHandle, exlProcessId)
    pProcess = System.Diagnostics.Process.GetProcessById(exlProce ssId)
    pProcess.Kill()
    Catch ex As Exception
    Return
    End Try



    Thanks in Advance
    Murali Krishna

  • 9 years ago

    You might find some pointers that help in this post:

    http://www.craigmurphy.com/blog/?p=82

    Please note that this post is not a direct recommendation to invoke the garbage collector, it is provided as a learning experience only.

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann