Excel not closing after using it via COM

From: Date: Tue, 23 Apr 2002 21:40:25 +0000
Subject: Excel not closing after using it via COM
Groups: php.windows 
Request: Send a blank email to php-windows+get-13257@lists.php.net to get a copy of this message
After working with Excel via COM, i cannot seem to get the instance of Excel to quit (CTL+ALT+DEL shows an 'EXCEL.EXE' in my process list). The script opens up a file, puts some numbers in, adds some numbers up, then closes the sheet and tells excel to exit. I've been trying for a few hours now to get Excel to actually *quit* when i call $excel->Quit(); unset($excel); I have made sure to save the book ($book->Save()), have set DisplayAlerts="FALSE" (which, on the MS website, says that Excel will force excel to exit even if there are unsaved changes). I've been trying various ways of calling Quit, Release and unset($excel)... all of them failing miserably to get excel to quit (I even adapted sample VB script to loop through all open books and save them... to be doubly-sure that all changes are saved). For example, the following code always fails and leaves an excel instance in memory. if (!$excel->Quit()) die("Cannot call excel->quit"); Can enyone help me out here? Can anyone tell me how to get at any errors that Excel might be returning (so i can figure out *why* it won't go away) I'm using Win2k, Office 2k, PHP 4.2.0. Thanks in advance.

« previous php.windows (#13257) next »