in reply to Using Perl and WriteExcel to split data from one column to many others
You do it basically the same way you're already doing. Just use a column counter that's set to 0 at the start of each row:
while (my @res = $sth->fetchrow_array()) { my $c=0; $worksheet->write($i, $c++, $_) for @res; $i++; }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Perl and WriteExcel to split data from one column to many others
by squarez (Initiate) on Oct 03, 2012 at 01:15 UTC | |
|
Re^2: Using Perl and WriteExcel to split data from one column to many others
by squarez (Initiate) on Oct 03, 2012 at 01:25 UTC | |
by Anique (Acolyte) on Oct 03, 2012 at 08:01 UTC | |
by squarez (Initiate) on Oct 03, 2012 at 17:58 UTC |