How to kill excel process
foreach (Process p in Process.GetProcesses())
{
if (p.ProcessName == "EXCEL")
{
p.kill()
}
}
i am using above code to kill the excel process..but it returns access denied error..please help me to kill all excel process...its urgent..pls reply..
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Vikrant Jadhav64 reputationPosted Dec 22, 2011, 9:23 PM EST
Refer the following link
http://stackoverflow.com/questions/5627560/killing-excel-exe-process-from-c-sharp-in-a-windows-service
Thanks & Regards
Vikrant Jadhav
If this post is helpfull to you then mark as a "Correct Answer".
Sam HobbsRank #107 · 20.5K reputationPosted Dec 24, 2011, 12:26 AM EST