RE: [PHP-WIN] PHP and COM issues with sessions
| From: | alain samoun | Date: | Wed, 23 Aug 2000 22:10:35 +0000 |
| Subject: | RE: [PHP-WIN] PHP and COM issues with sessions | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2086@lists.php.net to get a copy of this message | ||
Hi Matt:
Don't jump too quickly to the conclusion that PHP4-COM is "unstable", in
fact it works very well with Excel!
You have a lot of errors in your script, it's why you have these problems.
Instead to spell them out to you, follow this procedure and you should be
able to correct the script yourself: (This apply to Office 2000 programs,
the only copy that I have..)
1)Start the application then open the visual basic editor with the <ALT+F11>
short cut key
2)Select the Objects Editor <F2>.
3)Select the library (In your case Excel)
4)Enter, in the next box, a name of method or proprieties for the
application's library that you want more information on. (I suggest that you
start with 'visible')
5)Select a class or member and right click on the member name on the next
window below, select help and you will get the description for the class or
member with usually examples in VBA - you should be able to figure out how
to translate VBA to PHP.
Good luck!
Alain
Message from Alain Samoun
alain@samoun.com
-----Original Message-----
From: Matthew Podwysocki [mailto:gcprweb@hotmail.com]
Sent: Wednesday, August 23, 2000 1:42 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] PHP and COM issues with sessions
Thanks to all your help before on getting my COM to work. What I'm running
into now is that the Processes will not end once I run a web page. Here is
the following code I have been using:
$xlfile = "c:\\webroot\\test.xls";
$excel = new COM("Excel.Application") or die("Unable to start Excel");
echo "Loaded Excel Version ($excel->Version)\n";
$excel->{'Visible'}=1;
$workbook = $excel->Workbooks->Open($xlfile);
$worksheet = $workbook->Worksheets(1);
//$cellA1 = $worksheet->Range("A1")->('Value)';
//$cellB1 = $worksheet->Range("B1")->('Value');
$excel->ActiveWorkbook->Close(0);
$excel->Quit();
I commented out two lines because I couldn't get them to work due to some
parsing I have to figure out yet. By the time I'm finished testing a
particular segment of code, I have 15 excel processes running and cannot
shut them down. Has anyone else run into this situation and know more about
COM? It doesn't seem very stable at this point.
Regards,
Matt Podwysocki
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net