Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Spreadsheet::WriteExcel: How to change order of worksheets?

by clscott (Friar)
on Jan 04, 2005 at 18:18 UTC ( #419343=note: print w/replies, xml ) Need Help??


in reply to Spreadsheet::WriteExcel: How to change order of worksheets?

Do you know the names of the workbooks in advance so you can sort on that? You can store your worksheets in a hash so you can reference them properly later to addataand so on.
my %worksheets; foreach my $w (sort @ws_names_from somewhere){ $worksheets{$w} = $workbook->add_worksheet( $w ); }
--
Clayton

Replies are listed 'Best First'.
Re^2: Spreadsheet::WriteExcel: How to change order of worksheets?
by zeno (Friar) on Jan 04, 2005 at 18:28 UTC

    I think this may be the simplest approach. Actually, I need to parse through some of the names to avoid creating inappropriate sheets (the data gets dirty and I end up with strange sheet names like "null") sometimes. Using your hash would allow this better. Thanks.

    -- Zeno - Barcelona Perl Mongers http://barcelona.pm.org http://www.javajunkies.org
      Hmmm... Was anyone else wondering what this spreadsheet was about as they read "avoid creating inappropriate sheets (the data gets dirty"?

      I started thinking he was cataloguing "P&L of movies by classification" and had to suppress X-rated titles.

      Too bad the rest of the sentence took all the fun out of it... :)


      Mike

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2022-06-29 06:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (94 votes). Check out past polls.

    Notices?