Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by dragonchild (Archbishop)
on Jan 04, 2005 at 18:09 UTC ( [id://419333] : note . print w/replies, xml ) Need Help??


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

Upon sourcediving Spreadsheet::WriteExcel::Workbook, add_worksheet() hardcodes the index to the size of the {_worksheets} arrayref. So, #2 won't work.

However, #1 may be able to work, if you're willing to break encapsulation. But, I'll let jmcnamara show you the code. The names and indices are used all over the place. It's not enough to reorder the {_worksheets} arrayref.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Re: Spreadsheet::WriteExcel: How to change order of worksheets?

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

    Thanks for the insight. I figured that the reason the original module would not allow specifying where to insert the new worksheet was because it would be a very complex modification.

    Great sig, by the way.

    -- Zeno - Barcelona Perl Mongers http://barcelona.pm.org http://www.javajunkies.org