K
Kevin
I have a code which automates few things to create an excel file. The
problem is that once its done and saves the file and closes it the
excel process still is running in the background. It terminates it
self after the app completely closes it's self.
here is a pice of my code:
=======================================================
xlApp.SetUserControl(false);
xlApp.SetVisible(false);
wb = xlApp.GetWorkbooks();
_wb = wb.Add(covOptional);
ws = _wb.GetSheets();
//Automate some stuff...
_wb.SetSaved(TRUE);
_wb.SaveCopyAs(COleVariant(filePath));
_wb.Close(COleVariant(covFalse),COleVariant(filePath),COleVariant((long)0));
wb.Close();
xlApp.Quit();
xlApp.ReleaseDispatch();
xlApp = NULL;
wb = NULL;
ws = NULL;
_ws = NULL;
_wb = NULL;
so am I terminating these in the wrong order? I've tryed different
ways...
This class is called from button event.
problem is that once its done and saves the file and closes it the
excel process still is running in the background. It terminates it
self after the app completely closes it's self.
here is a pice of my code:
=======================================================
xlApp.SetUserControl(false);
xlApp.SetVisible(false);
wb = xlApp.GetWorkbooks();
_wb = wb.Add(covOptional);
ws = _wb.GetSheets();
//Automate some stuff...
_wb.SetSaved(TRUE);
_wb.SaveCopyAs(COleVariant(filePath));
_wb.Close(COleVariant(covFalse),COleVariant(filePath),COleVariant((long)0));
wb.Close();
xlApp.Quit();
xlApp.ReleaseDispatch();
xlApp = NULL;
wb = NULL;
ws = NULL;
_ws = NULL;
_wb = NULL;
so am I terminating these in the wrong order? I've tryed different
ways...
This class is called from button event.