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
Back to
Seekers of Perl Wisdom