I want to be able to end a task called "Microsoft Excel - test.xlsx" without ending any other applications that are also Excel applications.
I have used
foreach (Process process in Process.GetProcesses())
{
if (process.ProcessName.Equals("EXCEL"))
process.Kill();
}
but this kills all other Excel workbooks that are open. Is it possible to only kill or end the specified workbook?