RE: [PHP-WIN] Please help with PHP COM problem (using MS Office)
| From: | alain samoun | Date: | Sun, 25 Nov 2001 17:27:53 +0000 |
| Subject: | RE: [PHP-WIN] Please help with PHP COM problem (using MS Office) | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10604@lists.php.net to get a copy of this message | ||
Ha! maybe you make the same mistake of many: PHP is server side only, you
can't expect to see word or excel on the client side...
Alain
-----Original Message-----
From: Nicholas Catanchin [mailto:nicusor@ozemail.com.au]
Sent: Sunday, November 25, 2001 12:03 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Please help with PHP COM problem (using MS Office)
Hi!
I can't for the life of me figure out how to make excel or word visible
using COM. What I mean is:
$excel = new COM("Application.Excel");
$excel->visible = true;
does not work for me, no matter what I try!
I am running PHP 4.0.6 CGI alongside Apache 1.3.22 on Windows XP. I have
no trouble pulling the Version and Value settings, ie:
print "Loaded {$excel->Value}, v{$excel->Version}";
yields: Loaded Excel, v10.0
but doing:
print "Visible: {$excel->Visible}";
doesn't show anything (except "Visible:")
All the examples for using COM in PHP (including the example in the PHP
manual) include this command ($excel->visible = 1)... and I can't find
any resources on the net to help me...
I tried doing the same in VBScript and it worked fine (Setting visible
to 1)... so I'm really stuck here!
Things I have tried:
1) replacing true with: 1, "1", "true"
2) using $excel->application->visible = true (and others from 1)
3) installing Excel 2000 over Excel XP (2002) (as all the examples used
this...) and using $excel = new COM("Application.Excel.9")
In summary: I can do pretty much anything else using COM that I have
gotten examples for on the internet... I used Alain Samoun's EXCEL PHP
class without a problem (except that the bloody excel window won't
show!!)... and I can create word documents and insert data into them and
save them, but I never actually see the Word window.
Any help GREATLY appreciated, as I have been working on this for 2 days
and I can't find a solution. Thanks in advance,
Nicholas Catanchin.