Author: yogaraj.p | Posted on: 4/30/2010 4:27:10 AM | Views : 392

Hi,
    I am using icrosoft.Office.Interop.Excel to read the excel file datas. i need to kill the "EXCEL" process if any runtime error occur or any other "EXCEL" process running before read the excel data.
i am using this code to kill the process.
private void KillProcess(string processName)
        {
            System.Diagnostics.Process myproc = new System.Diagnostics.Process();
            //Get all instances of proc that are open, attempt to close them.
            try
            {
                foreach (System ...

Go to the complete details ...