On 5/9/05 9:39 PM, in article
[EMAIL PROTECTED], "Ian
Harisay" <[EMAIL PROTECTED]> wrote:

> 
> This is really off topic.
> 

Not so. I was more interested in how the fetchrow_arrayref works (or wasn't
working because of my ignorance). I probably should have posted just that
portion and left out the Spreadsheet stuff because once I know what is
coming out of the while statement I can do the rest of the Spreadsheet
stuff.

Robert 

> -----Original Message-----
> From: Robert [mailto:[EMAIL PROTECTED]
> Sent: Mon 5/9/2005 1:45 PM
> To: dbi-users@perl.org
> Subject: Spreadsheet::WriteExcel question
>  
> My ignorance is showing.  : )
> 
> I am pulling data out of Oracle and putting it into an Excel spreadsheet.
> 
> Using this:
> 
> while ( $row = $sth->fetchrow_arrayref ) {
>     # this is a fast and simple way to deal with nulls:
>     foreach (@$row) { $_ = '' unless defined }
>     push (@results, @$row);
> }
> 
> my $workbook = Spreadsheet::WriteExcel->new("report.xls");
> $worksheet   = $workbook->add_worksheet();
> $worksheet->write_row('A2', [EMAIL PROTECTED]);
> 
> It give me columns of the data:
> 
> s    s    s
> 1    3    4
> A    B    C
> 
> Where I am looking for rows:
> 
> s    1    A
> s    3    B
> s    4    C
> 
> I know it has to do with my "while statement"...I am just not up to speed on
> what.
> 
> Thanks for any help.
> 
> Robert 
> 
> 
> 

Reply via email to