Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing Excel in Delphi 5

Status
Not open for further replies.

MARTINRODDY

Programmer
Apr 3, 2001
30
US
Hi,

I have created an instance of an excel worksheet in a system I'm developing. The data is read from the spreadhseet and everything works fine. The problem I have is that the instance of excel stays open in memory when I close the software. The process list from alt+ctrl+del shows that EXCEL.EXE still lives. I have included openexcel.quit; in my code but doesn't seem to work. This causes Excel to freeze if you try and open it through the start menu etc.

Does anyone have a statement which will kill this EXCEL.EXE process, it causes the memory to clog if the functionality is run often.

Appreciated.
Martin
 
i also have this problem when opening a spreadsheet from a web page..

what version of excel and windows are you running ?
 
var ExcelApp: OleVariant;
....
Before you close your application, put this code:
if not VarIsEmpty(ExcelApp) then
ExcelApp.Quit;
Close; //Close your main form
Nha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top