in reply to How does DBI return an arrayref with key/value pairs?
Actually, I won't take much credit for that. I found something similar on the perlmonks site itself. I hope this helps..my $row=0; my $col=0; $xWS->write($row, $col++, $_) for @{$sth->{NAME}}; # Read the query results and write them into the spreadsheet while (my $ar=$sth->fetchrow_arrayref) { ++$row; $col=0; $xWS2->write($row, $col++, $_) for @$ar; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How does DBI return an arrayref with key/value pairs?
by walkingthecow (Friar) on Jun 21, 2013 at 14:26 UTC |