Win2Kpro, PHP4.2.1, Apache 1.3.26dev

I would like to make a copy of a sheet in an existing excel
spreadsheet from within PHP using COM.

I can open an existing .xls file and rename a sheet using;
========8<=================
$excel = new COM("Excel.Application") or die("Excel could not be started");
$excel->DisplayAlerts = 0;// turn off alerts
$workbook = "c:\\tmp\\tst1.xls";
$wkb = $excel->application->Workbooks->Open($workbook) or Die ("Did not
open");
$sheet1 = $wkb->Worksheets(1); //Select the sheet
$sheet1->activate; //Activate it
$sheet1->name="Report First page";
========8<=================
To try and work out how to copy a sheet I created a macro in excel;
Sheets("Report First page").Select
Sheets("Report First page").Copy After:=Sheets(1)
Sheets("Report First page (2)").Select
Sheets("Report First page (2)").Name = "new Sheet"

My problem is that I can't work out the php version of
Sheets("Report First page").Copy After:=Sheets(1)

ie there is a space between Copy and After
and how do I get the := operator?

Any suggestion much appreciated.
(I have looked through the online docs, mailing list, ms and googled but
havn't found a solution)

Regards
Andrew Braund


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to