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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |