devbond has asked for the wisdom of the Perl Monks concerning the following question:
use warnings;
use Spreadsheet::WriteExcel;
use Spreadsheet::ParseExcel;
use Spreadsheet::ParseExcel::SaveParser;
sub create_excel {$workbook = Spreadsheet::WriteExcel>new('FAISTATS_'."$Month".'.xls');
for ( $i=1;$i<=8;$i++) {
$s$i = $workbook->add_worksheet( "rpzea0".$i."a001" ) ;
} }&create_excel();
I want to create 8 different worksheets inside the excel sheet FAI_STATS_$Month.xls .I am able to do it when the code is not inside a subroutine but when i place the code inside a subroutine and call it ..it only creates one worksheet that too with the name of the FILe. Please help
|
|---|