Hi Monks, I have to create a column chart with rwo series in a ppt, I have the data for the chart in separate arrays. Please help me withthe command to add a chart in a ppt. I have give the code that i used to create a ppt and add a slide in it.

my $PptApp = Win32::OLE->GetActiveObject('PowerPoint.Application')|| +Win32::OLE->new('PowerPoint.Application', 'Quit'); $PptApp->{Visible} = 1; #my $Presentation = $PptApp->Presentations->Add(); my $Presentation = $PptApp->Presentations->Open({FileName=>'C:\Users\n +1013784\Desktop\New folder\weeklytemplate1.pptx',ReadOnly=>0}); my $value = 0; my $AfterSlide = "Agenda"; my $SlideIndex = 1; my $slides = Win32::OLE::Enum->new( $Presentation->Slides ); while ( my $slide = $slides->Next ) { print "Slide_Name : " . $slide->Name . "\n"; my $shapes = Win32::OLE::Enum->new( $slide->Shapes ); SHAPE: while ( my $shape = $shapes->Next ) { my $type = $shape->PlaceholderFormat->Type; if ( $type == ppPlaceholderTitle or $type == ppPlaceholderCent +erTitle or $type == ppPlaceholderVerticalTitle) { print "Title : |" . $shape->TextFrame->TextRange->text . " +|\n"; if($shape->TextFrame->TextRange->text eq $AfterSlide){ $value = $SlideIndex + 1; print "Put it on $SlideIndex\n"; } $SlideIndex++; last SHAPE; } } print "\n"; } my $Slide = $Presentation->Slides->Add({Index=>$value , Layout=>ppLayo +utText}); $Slide->{Name} = "111 + $dev"; my $Title=$Slide->Shapes->{Title}; $Title->TextFrame->TextRange->{Text} ="Weekly Metrics - Closed Tick +ets";

In reply to 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.