엑셀 작업하는 프로그램을 만들었는데 잘 안죽더라.

그래서 시작전에 엑셀 파일 저장 후 닫으라고 한 후,

엑셀 볼일이 끝나면 작업중인 엑셀을 모두 죽이는 프로시저를 만들었다 -_-;



System.Diagnostics.Process[] PROC = System.Diagnostics.Process.GetProcessesByName("EXCEL");

foreach (System.Diagnostics.Process PK in PROC)

{

    if (PK.MainWindowTitle.Length == 0)

        PK.Kill();

}

Posted by motolies
,