Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Not able to create worksheets inside a subroutine

by devbond (Novice)
on Sep 29, 2013 at 15:53 UTC ( #1056233=note: print w/ replies, xml ) Need Help??


in reply to Re: Not able to create worksheets inside a subroutine
in thread Not able to create worksheets inside a subroutine

i made the following modifications but still no change in the output :(

#!/usr/bin/perl

use warnings; use Spreadsheet::WriteExcel; use Spreadsheet::ParseExcel; use Spreadsheet::ParseExcel::SaveParser; $Month=Sept; my @s; sub create { $workbook = Spreadsheet::WriteExcel->new('FAISTATS_'.'$Month'.'xls'); for $i(1..8) { $s[$i] = $workbook->add_worksheet( "rpzea0".$i."a001" ) ; } } create();


Comment on Re^2: Not able to create worksheets inside a subroutine
Download Code
Re^3: Not able to create worksheets inside a subroutine
by hdb (Prior) on Sep 29, 2013 at 15:59 UTC

    Please add use strict; at the beginning and correct all errors that will be thrown. Also, the single quotes around $Month will prevent that you get the correct month. You also lack a dot in front of the extension xls.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056233]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2015-07-05 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls