RE: [PHP-WIN] Excel not closing after using it via COM

From: Date: Wed, 24 Apr 2002 05:04:54 +0000
Subject: RE: [PHP-WIN] Excel not closing after using it via COM
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-13265@lists.php.net to get a copy of this message
Not sure if this will help or not, but I had a similar issue using Perl. Turns out that it was popping up a dialog box on the server when I did a save or saveas and there was a pre-existing file with that same name. I solved it by first deleting the file, then doing a saveas and the problem went away. Scott At 06:17 PM 4/23/02 -0500, Neil Lincoln wrote:
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:scott@eacnet.com] 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
-- http://www.geocities.com/Helphand1/ Helphand's Not So FAQ's for the Palm http://www.geocities.com/helphand1/palmprobs.htm

« previous php.windows (#13265) next »