Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: using PHP's COM extension
10-24-2003, 04:23 PM #1
- Join Date
- Oct 2003
- Thanked 0 Times in 0 Posts
using PHP's COM extension
I have this code:
$excel = new COM("Excel.Application" ) or Die ("Did not connect" );
$excel->Visible = 1;
$wkbs = $excel->Workbooks->Add();
it runs and an instance of excel.exe is created, but I don't see the app. I thought the visible property showed like it would if you would manually start excel.
I have also tried using:
$excel->application->visible = 1;
No joy still
Please help someone. I am working with PHP4/Apache 1.3 on XP
10-25-2003, 04:40 AM #2
- Join Date
- May 2002
- Perth Australia
- Thanked 92 Times in 90 Posts
Hi , COM is useful , but when used as part of a PHP web-based script the idea is not really to show the interface (many COM applications dont even have an interface) .
Its more for say , passing data to an instance of Word or Excel and then get Word or Excel to save/manipulate that data in is native format, or whatever functionality your COM object provides.
If you want to actually see the thing you need to drop out of the webserver , eg , save your script as (eg call it whaever you want ) comtest.php.sh
then open notepad and save the following but with your own paths to PHP and the script... as comtest.bat (save it anywhere)
c:\phpdev\php\php-4.3.3\php.exe -f e:\phpdev\www\comtest.php.sh
then double click the .bat file and you should see excel and that stupid paperclip (actually I think the paperclip does not work here unless invoked but I dunno for sure cos I terminated mine ages ago )resistance is...
MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)