Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# excel workbook

static public void KillExcelWorkbook(string wbook)
{
  Process[] processes = Process.GetProcessesByName("Excel");
  if (processes.Length == 0)
    return;
  foreach(Process p in processes)
  {
    if (p.MainWindowTitle.Contains(wbook))
    {
      p.Kill();
      return;
    }
  }
}
 
PREVIOUS NEXT
Tagged: #excel #workbook
ADD COMMENT
Topic
Name
4+1 =