I spent many hours on this and gave up and added a process kill for the EXCEL "zombie" after exiting the COM code. There must be a better way..
-----Original Message----- From: Scott Hurring [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 4:40 PM To: Php-Win (E-mail) Subject: [PHP-WIN] Excel not closing after using it via COM 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. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php