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.
 


Reply via email to