You were right Amy...I guess I was OT after all.

Robert

"Amy Farrell" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Robert,
>
> I think your problem is not in the "while" loop, but in your use of 
> write_row. (Which I guess makes this answer off-topic, if not the question 
> itself.) Try write_col. The perldoc for Spreadsheet::WriteExcel describes 
> this behavior, with detailed examples (granted, I'm having to make some 
> assumptions about what you're fetching).
>
>  - Amy
>
> On 5/9/2005 12:45 PM, Robert wrote:
>
>> 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
>
> -- 
> Amy Farrell                 Senior Applications Engineer
> [EMAIL PROTECTED]                  503 445-8057
> www.emarket-group.com               www.eMerchandise.com
>
> 


Reply via email to