![]() |
excel.exe is not terminating from task manager
Hi,
I am using VC++ for Excel Automation using Type library Excel9.olb My problem is,I am openning an Large Excel file (about 4000 rows and 150 columns of data) using CWorkbooks - Open then I am closing the work book using Close and release dispatch then I am using CApplication - Quit and Release dispatch to quit the excel application, still the excel.exe will be running in the task manager. If I try to Open a small file say about 5 rows and 10 columns it is closing successfully. I also tried the application running it in the foreground by using CApplication - put_visble(true) the application will close but still I find excel.exe running in the task manager. OpenSourceExcelFile(CString &strSource) { BOOL bRet=TRUE; CApplication oExcel=NULL; CWorkbooks oBooks=NULL; LPDISPATCH lpDisp=NULL; COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR); oExcel.CreateDispatch(_T("Excel.Application")); oExcel.put_UserControl(FALSE); oBooks.AttachDispatch(oExcel.get_Workbooks()); //-------------------------------------------------------------- //Open the Source Excel File and get the Data lpDisp=oBooks.Open(strSource,\ covOptional, covOptional, covOptional, covOptional,\ covOptional, covOptional, covOptional, covOptional,\ covOptional, covOptional, covOptional, covOptional); ASSERT(lpDisp); ........................... .................... ..................... oBooks.Close(); oBooks.ReleaseDispatch(); oExcel.Quit(); oExcel.ReleaseDispatch(); oExcel=NULL; } Can you please provide a solution for my problem In Anticipation of your reply.. Regards, Inthiqab |
All times are GMT +1. The time now is 08:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com