Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel close on startup, but stay in task manager Thomas Excel Discussion (Misc queries) 3 May 20th 10 06:58 AM
Printing leaves EXCEL.EXE process in Task Manager eeidfn Excel Discussion (Misc queries) 1 February 28th 06 02:24 AM
Task Manager and Excel 2003 Mike Excel Discussion (Misc queries) 1 April 20th 05 10:40 PM
EXCEL keeps running in task manager Sam Excel Programming 4 January 22nd 04 11:17 AM
get the program id of an excel application from the task manager nikolaosk[_5_] Excel Programming 2 October 14th 03 03:06 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"