zeno has asked for the wisdom of the Perl Monks concerning the following question:
I am using Spreadsheet::WriteExcel. I need to add many worksheets to a workbook. I need either:
Any insights, perhaps a different module? Thanks.
- Some way to reorder the worksheets alphabetically by name.
- A method of telling the add_worksheet method where to insert the new worksheet (it defaults to after the last sheet)
use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new("foo.xls"); my $worksheet1 = $workbook->add_worksheet("alfa"); my $worksheet2 = $workbook->add_worksheet("charlie"); # Select "alfa" thinking "bravo" would insert after # it... it does not work. Final order remains # "alfa, charlie, bravo", not "alfa, bravo, charlie" # as desired. $worksheet1->select(); my $worksheet3 = $workbook->add_worksheet("bravo"); $workbook->close();
Any insights, perhaps a different module? Thanks.
--
Zeno - Barcelona Perl Mongers http://barcelona.pm.org
http://www.javajunkies.org
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Spreadsheet::WriteExcel: How to change order of worksheets?
by dragonchild (Archbishop) on Jan 04, 2005 at 18:09 UTC | |
by zeno (Friar) on Jan 04, 2005 at 18:25 UTC | |
Re: Spreadsheet::WriteExcel: How to change order of worksheets?
by friedo (Prior) on Jan 04, 2005 at 18:13 UTC | |
by zeno (Friar) on Jan 04, 2005 at 18:21 UTC | |
by jmcnamara (Monsignor) on Jan 05, 2005 at 01:10 UTC | |
Re: Spreadsheet::WriteExcel: How to change order of worksheets?
by clscott (Friar) on Jan 04, 2005 at 18:18 UTC | |
by zeno (Friar) on Jan 04, 2005 at 18:28 UTC | |
by RMGir (Prior) on Jan 04, 2005 at 21:15 UTC |
Back to
Seekers of Perl Wisdom