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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.