PHP Classes

Question

Recommend this page to a friend!

      db_conn  >  All threads  >  Question  >  (Un) Subscribe thread alerts  
Subject:Question
Summary:about msoffice in php
Messages:3
Author:zxgcm
Date:2004-12-19 04:01:03
Update:2007-05-11 15:59:22
 

  1. Question   Reply   Report abuse  
Picture of zxgcm zxgcm - 2004-12-19 04:01:03
i want to know how to use msoffice in php site.

  2. Re: Question   Reply   Report abuse  
Picture of Robert Sevcik Robert Sevcik - 2004-12-21 08:04:20 - In reply to message 1 from zxgcm
Hi,

First, you should run on WINDOWS (I realy don't know if it is possible on LINUX) and have the COM object properly installed. May be you'll have to configure COM permissions for the user that PHP runs under (run dcomcnfg).

Then get an object api reference for the object you are going to use (excel.application, OWC10.SpreadSheet...) from the M$ web or from wherever it is installed.

Then just use PHPs COM extension to call COM object methods and to get and set its properties.

Better choice for COM is PHP5 which has better support, but with PHP4 it is possible as well.

A little example, just to verify that it's working (MS excel installed and accessible):

$oExcel = new COM("Excel.Application") or Die ("Did not instantiate Excel");


  3. Re: Question   Reply   Report abuse  
Picture of aldemar aldemar - 2007-05-11 15:59:22 - In reply to message 1 from zxgcm
How to connection to for eexcel, I do not , I use next codig
oExcel = new COM("Excel.Application") or Die ("Did not instantiate Excel");
return error for linux
You cant get example for linux in class php
thank you..
lunafive123