hello,
I'm trying to draw some graphs using COM objects, but it seems I can't 
set any property..

here's my script snip:


$ex = new COM("Excel.sheet") or Die ("No COM");
print("Application name: {$ex->Application->value}<br>");
print("Loaded version: {$ex->Application->version}<br>");
$wkb = $ex->Application->Workbooks->Add();
$ch = $wkb->Charts->Add;
print_r( $ch );
$ch->Activate;
$ch->hastitle = 1;
$ch->ChartTitle->Text='pippo';
$leg=$ch->Legend;
echo $leg->Height;
$leg->Height=200;

I get:

Application name: Microsoft Excel
Loaded version: 9.0

Warning: PropPut() failed: Exception occurred. Source: Microsoft Excel 
Description: Unable to set the HasTitle property of the Chart class in 
c:\program files\apache\htdocs\bs-test\com\exp-graph-excel.php on line 
19
.....

and so on for any of the subsequent statements; (the echo $leg->Height 
gives a PropGet failed..)
the HasTitle property really exists, like ChartTitle->Text, Height 
etc...

I had worked with COM/Powerpoint and everything goes;

any hint?

thank you very much,
--giuseppe



Reply via email to