locked
Problem in closing the EXCEL.exe which is opened by C# RRS feed

  • Question

  • Im using C# 2010 and've added a reference to the Microsoft.Office.Interop.Excel

    My Problem is : after calling the XLApp.close() method still leave the EXCEL.EXE Open in the Taskmanager

       using Excel = Microsoft.Office.Interop.Excel;

       public static void ReadXL(string XLPath)
            {
                Excel.Application xlAP = new Excel.Application();
                xlAP.Visible = true;
                Excel.Workbooks xlWorkBooks = xlAP.Workbooks;
                Excel.Workbook xlSheet = xlWorkBooks.Open(XLPath);

                xlAP.Workbooks.Close();
                xlAP.Quit(); //It closes the Excel, but it leaves EXCEL in the Taskmanger Running
            }

    Could some one give me a straight answer for me to solve this problem!!

    Don't ask further questions even a child could understand this problem!

     

    Regards

    Pradeep


    Thursday, May 19, 2011 9:59 AM

Answers

All replies