Link to home
Start Free TrialLog in
Avatar of Adnan
AdnanFlag for Norway

asked on

How to kill excel process kill....

Hi

I want to kill the excel process when it go's to exception handling, because when i get exception for some reason it returns back to my application, but the excel is still running in process.
ASKER CERTIFIED SOLUTION
Avatar of Adnan
Adnan
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Adnan

ASKER

another solution here: ;)*

Process[] process = Process.GetProcessesByName("Excel");
                for (int i = 0; i < process.GetLength(0); i++)
                {
                    //kills excel process
                    process[i].Kill();
                }