in reply to Re^2: Creating an excel document from hashes
in thread Creating an excel document from hashes

rahulruns:

You should be able to do it with something like:

use Spreadsheet::WriteExcel; . . . . code to build hash . . . . my $XL = Spreadsheet::WriteExcel->new('output_file.xls'); my $WS = $XL->add_worksheet('my data'); my ($ROW, $COL) = (0, 0); for my $colname (keys %graph_point_hash) { # Add column header $WS->write_string($ROW, $COL, $colname); # Add column $WS->write_col($ROW+1, $COL, $graph_point_hash{$colname}); # Move on to next column ++$COL; }

...roboticus

When your only tool is a hammer, all problems look like your thumb.