arundurai has asked for the wisdom of the Perl Monks concerning the following question:
I can create a table in a ppt using the following code, but i want to include some changes in the design while creating it. The changes are to 1: Increase the width of the second column and align the table to the left extreme etc The code that I used to create a table is as follows
my $Slide = $Presentation->Slides->Add({Index=>$value , Layout=>ppLayo +utText}); $Slide->{Name} = "Slide111112"; my $Title=$Slide->Shapes->{Title}; $Title->TextFrame->TextRange->{Text} ="Weekly Analysis - Closing Ba +lance"; print( "Adding a 4 wide by 3 high table\n" ); my $table1 = $Slide->Shapes->AddTable( 5, # Rows 3, # Cols 50, # X-axis 110 # Y-axis ); my $columns1 = $table1->Table->Columns->Count; my $rows1 = $table1->Table->Rows->Count; my @sno = ("S No", 1, 2, 3, ''); my @ts = ("Ticket Status", "Open Rickets", "Closed Rickets", "Back Log +Tickets", "Grand Total"); my @tc =("Ticket Count","$op","$cl","$other","$tot"); for ( my $row = 0; $row < $rows1; $row++ ) { my $cell2 = $table1->Table->Rows($row+1)->Cells(1); my $textframe = $cell2->Shape->TextFrame; $textframe->TextRange->{Text} = "$sno[$row]"; $textframe->TextRange->Font->{Name} = "Arial"; $textframe->TextRange->Font->{Size} = "10"; ###################################################### my $cell3 = $table1->Table->Rows($row+1)->Cells(2); my $textframe1 = $cell3->Shape->TextFrame; $textframe1->TextRange->{Text} = "$ts[$row]"; $textframe1->TextRange->Font->{Name} = "Arial"; $textframe1->TextRange->Font->{Size} = "10"; ###################################################### my $cell4 = $table1->Table->Rows($row+1)->Cells(3); my $textframe2 = $cell4->Shape->TextFrame; $textframe2->TextRange->{Text} = "$tc[$row]"; $textframe2->TextRange->Font->{Name} = "Arial"; $textframe2->TextRange->Font->{Size} = "10"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: create a formatted table in ppt
by hdb (Monsignor) on Mar 20, 2013 at 08:36 UTC | |
|
Re: create a formatted table in ppt
by hdb (Monsignor) on Mar 20, 2013 at 11:55 UTC | |
by arundurai (Initiate) on Mar 21, 2013 at 08:38 UTC |