ChrisJRutter
Member
Hi
I am having trouble releasing Excel from memory.
The following works just fine; Excel is loaded and released from memory correctly:
CREATE "Excel.Application" chExcel.
chBook = chExcel:Workbooks:Add.
chSheet = chBook:Sheets:Item("Sheet1").
chSheet:Activate.
RELEASE OBJECT chSheet.
RELEASE OBJECT chBook.
chExcel:QUIT().
RELEASE OBJECT chExcel.
But then if I add in the additional code (in blue):
CREATE "Excel.Application" chExcel.
chBook = chExcel:Workbooks:Add.
chSheet = chBook:Sheets:Item("Sheet1").
chSheet:Activate.
chSheet:Range("A1:B2"):Select().
chSelection = chExcel:Selection.
RELEASE OBJECT chSelection.
RELEASE OBJECT chSheet.
RELEASE OBJECT chBook.
chExcel:QUIT().
RELEASE OBJECT chExcel.
The selection statement works and Excel appears to exit but in trak manager the Excel.exe is still resident in memory.
I have tried swapping the RELEASE statements around without success.
Any help would be greatly appreciated.
Cheers
I am having trouble releasing Excel from memory.
The following works just fine; Excel is loaded and released from memory correctly:
CREATE "Excel.Application" chExcel.
chBook = chExcel:Workbooks:Add.
chSheet = chBook:Sheets:Item("Sheet1").
chSheet:Activate.
RELEASE OBJECT chSheet.
RELEASE OBJECT chBook.
chExcel:QUIT().
RELEASE OBJECT chExcel.
But then if I add in the additional code (in blue):
CREATE "Excel.Application" chExcel.
chBook = chExcel:Workbooks:Add.
chSheet = chBook:Sheets:Item("Sheet1").
chSheet:Activate.
chSheet:Range("A1:B2"):Select().
chSelection = chExcel:Selection.
RELEASE OBJECT chSelection.
RELEASE OBJECT chSheet.
RELEASE OBJECT chBook.
chExcel:QUIT().
RELEASE OBJECT chExcel.
The selection statement works and Excel appears to exit but in trak manager the Excel.exe is still resident in memory.
I have tried swapping the RELEASE statements around without success.
Any help would be greatly appreciated.
Cheers