anand_perl has asked for the wisdom of the Perl Monks concerning the following question:
use Spreadsheet::WriteExcel my $workBook = Spreadsheet::WriteExcel -> new ( "report.xls" ); foreach $file ( @files ) { if ( ! ( ( $file eq "." ) || ( $file eq ".." ) ) ) { #Create excel sheet for each testsuite. my $workSheet; $workSheet = create_excel ( $file ); write_excel ( $workSheet ); } }
sub create_excel { my $name = shift; my $worksheet = $workBook->add_worksheet( "$name" ); #my $format = $workBook->add_format ( border => 2, valign => ' +vcenter', align => 'center', bold => 1, ); #$format->set_bg_color('47'); #my $format1 = $workBook->add_format ( border => 2, align => ' +center', bold => 1 ); #$format1->set_bg_color('47'); #my $format2 = $workBook->add_format ( border => 2, valign => +'vcenter', align => 'center', bold => 1, ); #$format2->set_bg_color('42'); #$worksheet->set_column ( "C:C",40 ); #$worksheet->merge_range ( "C6:C8","TEST",$format ); #$worksheet->merge_range ( "D6:H6","RESULT",$format ); #$worksheet->merge_range ( "I6:N6","PAGES",$format ); return $worksheet; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Work Sheets in excel in Perl
by jmcnamara (Monsignor) on Sep 29, 2008 at 09:32 UTC | |
by anand_perl (Novice) on Sep 29, 2008 at 09:45 UTC | |
|
Re: Work Sheets in excel in Perl
by dragonchild (Archbishop) on Sep 29, 2008 at 14:39 UTC | |
|
Re: Work Sheets in excel in Perl
by Anonymous Monk on Sep 29, 2008 at 06:26 UTC |