Gomathi Palaniswamy

Gomathi Palaniswamy

  • NA
  • 3.5k
  • 2.2m

How to kill excel process

Dec 23 2011 12:27 AM

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..

Answers (2)