After quiting excel using objApp.Quit();, 'excel' still appears in the task manager!!
Posted on 2003-03-12
i am using the excel automation to read and write data.below is how the program goes when i have finished writing and ready to close my excel obj application
COleVariant VOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
//Set the range value to the SAFEARRAY.
objSheet.SaveAs(m_csFilename, VOptional, VOptional,
//close the safearray
//to prevent having more than 1 excel in task manager
m_bStartRecording = FALSE;
TRACE("m_bStartRecording == FALSE......end of recording");
objBook.Close(COleVariant((short)FALSE), VOptional, VOptional);
objBook = NULL;
However after running the program above to close the excel file, the excel program still exist in the task manager.it is only upon closing my dialog box, the excel file no longer exist in the task manager.
the problem is crucial to me because i would like to open and read the excel file which i recorded data without the need to close my dialog box. concurrently this is not possible because there exist a ghost excel file in the task manager that stops me from opening other excel files.