Thanks again - I've looked at your class as suggested (this was where I got the
original example from!)
Unfortunately I still seem to get the same problem - the instance of Excel will not
close on exit. The code reads the data in cell 11,5 of the Excel file fine - it's ALL
OK, I just can't get the Quit function to release the app!
Have you any idea why this happens and how I can fix it? I've tried on several
different machines with the same result.
Here is the code I've used ..
<?php
echo "
<HTML><HEAD><TITLE>Processing Form</TITLE></HEAD><BODY BGCOLOR=\"#D5D5AB\">
<h1>This is a test</h1>";
$xlApp = new COM("Excel.Application") or Die ("Did not connect");
$workbook = 'e:\wwwroot\temp\xxx.xls';
$wkb = $xlApp->Workbooks->Open($workbook) or Die ("Did not open");
$sheets = $wkb->Worksheets("Sheet1");
$cell = $sheets->Cells(11,5);
print "Cell Value = {$cell->value} <BR>";
$xlApp->ActiveWorkbook->Close("False");
$xlApp->Quit;
$xlApp = null;
echo "</body></html>";
?>
----Original Message-----
From: "Alain Samoun" <[EMAIL PROTECTED]>
Sent: 10 September 2001 22:36
To: "Jeff Waldock" <[EMAIL PROTECTED]>
Cc: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: [PHP-WIN] Closing Excel using DCOM and Release()
Well, to close your Excel App, you will use:
xlApp->quit;
Talk about consistency from M$ ;)
For Excel, you may want to have a look at my class:
http://www.phpbuilder.com/columns/alain20001003.php3
It's becoming old now, but still has some value I guess.
Alain
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]