Hi, I suppose 'ex' is the excel object in your code. Then you should use ex->Quit to get rid of it. That is - any unsaved altered Workbook produces a warning dialog and when you use an excel instance that has been opened by the user you can't close it anyway. But you wrote your clients machine gets cluttered with excel instances. So you seem to have the correct method of instantiation anyway. As excel is unsurmountably tweakable there might exist Addins on your clients machine that produce other alerts on termination of excel. You may want to do com_set(ex, "DisplayAlerts", false) to suppress any questions just before the Quit. And to suppress unsolicited human interaction at all, you ca do com_set(ex, "Interactive", false) at appropriate points of your COM session. This of course has to be reverted just before any wanted user input. A last unwanted hint: Changing lots of data usually means a lot of writing to display: com_set(ex, "ScreenUpdating", false) before any such task makes excel hurry up a lot.
Hope this helps, Cheers, -- Sven Schnitzke > -----Ursprüngliche Nachricht----- > Von: Chris Kranz [SMTP:[EMAIL PROTECTED]] > Gesendet am: Sonntag, 2. Februar 2003 15:26 > An: [EMAIL PROTECTED] > Betreff: [PHP-WIN] Problem closing COM object > > Hey there, > > I've built a nice little app for a client that will open a COM object, > and save data to an Excel spreadsheet. However, I'm having problems > closing it. It seems to close fine on my laptop, but on my clients > machine, the instance of Excel stays loaded, and multiple instances are > loaded every time the script is run. > > I've tried several different methods of closing it, that's why this code > is a little longer than the examples around... > > Code: > > ... > $ex->Application->ActiveWorkbook->Close("False"); > $wkb->Release(); > $ex->Quit(); > $ex->Release(); > unset($wkb); > unset($ex); > > chris kranz > fatcuban.com > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php