title: Closing a particular excel file when multiple excel files are opened
body: <p>I am trying to close an excel file named TestReport.xlsx using the below code. It is working when only one excel process is running but when I have multiple excel windows open, the MainWindowTitle changes and the code is not killing the desired excel process.</p>
  
  <pre><code>Process[] plist = Process.GetProcessesByName("Excel",".");
  foreach(Process p in plist)
  {         
  
      if (p.MainWindowTitle.Contains("TestReport.xlsx") &amp;&amp; p.ProcessName == "EXCEL")
      {
          p.Kill();
      }
  }
  </code></pre>