Let me help you to get started. But I am afraid if you want to program MS Office using Perl, you have to learn this...
my $chart = $Slide->Shapes->AddOLEObject( 50, 50, 500, 500, "MSGraph.C +hart" ); my $graph = $chart->OLEFormat->Object; my $datasheet = $graph->Application->DataSheet; explore( $datasheet ); $datasheet->Cells(1,2)->{'Value'} = "Col1"; $datasheet->Cells(1,3)->{'Value'} = "Col2"; $datasheet->Cells(1,4)->{'Value'} = "Col3"; $datasheet->Cells(1,5)->{'Value'} = "Col4"; $datasheet->Cells(2,1)->{'Value'} = "Row1"; $datasheet->Cells(3,1)->{'Value'} = "Row2"; $datasheet->Cells(4,1)->{'Value'} = "Row3"; $datasheet->Cells(5,1)->{'Value'} = "Row4"; for( my $row=2; $row<=5; $row++ ) { for( my $col=2; $col<=5; $col++ ) { $datasheet->Cells($row,$col)->{'Value'} = rand(); } } $datasheet->Application->Update;
Right now I have not time to exhaustively test this so you need to play with it as described in my earlier post.
In reply to Re^3: Create a chart in PPT
by hdb
in thread Create a chart in PPT
by arundurai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |