basm101 has asked for the wisdom of the Perl Monks concerning the following question:
I can print out the values like this:key1 -> 1 2 3 4 5 6 7 8 key2-> 4 6 7 8 3 2 9 7 key3-> 2 3 5 8 9 1 1 2
I really want to empty this data into a spreadsheet using the Spreadsheet::WriteExcel module.for my $hash_count ( sort {$a<=>$b} keys %hash){ print "($hash_count)-> @{$hash{$hash_count}}\n"; }
The idea was to push a load of references to arrays into @spread_array. Can anyone help with getting a hash of arrays into a spreadsheet ? I know 2D arrays can be written in one go.for $hash_count ( sort {$a<=>$b} keys %hash){ push @spread_array,"$hash{$hash_count}"; } $worksheet->write_col(1,1,\@spread_array);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: emptying a hash into a spreadsheet
by jeffa (Bishop) on Aug 04, 2003 at 14:14 UTC | |
|
Re: emptying a hash into a spreadsheet
by dragonchild (Archbishop) on Aug 04, 2003 at 14:14 UTC | |
|
Re: emptying a hash into a spreadsheet
by rupesh (Hermit) on Aug 05, 2003 at 10:20 UTC |