Re: Spreadsheet::WriteExcel

2006-02-24 Thread Scott T. Hildreth
On Fri, 2006-02-24 at 05:56 -0800, Robert wrote:
> Hi list,
>   I have installed Spreadsheet::WriteExcel and Parse::RecDescent without any 
> issues, compilation and installation went went but they are not working.
>
>
>
>   bash-2.05# perl -MSpreadsheet::WriteExcel
> Spreadsheet/WriteExcel.pm did not return a true value.
>
>   bash-2.05# perl -MParse::RecDescent
> Parse/RecDescent.pm did not return a true value.
> BEGIN failed--compilation aborted.
>
>   Anyone has same issue?

Nope.
>
>   Thanks in advance

 This really is the right list to post such a question.
 Look at this page for all kinds of perl lists,

 http://lists.cpan.org/

 ...I would also suggest using www.perlmonks.org , that
 is a good place to get help.

>
> 
> 
> 
>   
> -
> Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
-- 
Scott T. Hildreth <[EMAIL PROTECTED]>


Spreadsheet::WriteExcel

2006-02-24 Thread Robert
Hi list,
  I have installed Spreadsheet::WriteExcel and Parse::RecDescent without any 
issues, compilation and installation went went but they are not working.
   
   
   
  bash-2.05# perl -MSpreadsheet::WriteExcel
Spreadsheet/WriteExcel.pm did not return a true value.
   
  bash-2.05# perl -MParse::RecDescent
Parse/RecDescent.pm did not return a true value.
BEGIN failed--compilation aborted.
   
  Anyone has same issue?
   
  Thanks in advance
   




-
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!

Re: Spreadsheet::WriteExcel question

2005-05-10 Thread Ian Harisay
In that case using Data::Dumper is quite nice for figuring those types 
of things out.

Robert wrote:
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:
sss
134
ABC
Where I am looking for rows:
s1A
s3B
s4C
I know it has to do with my "while statement"...I am just not up to speed on
what.
Thanks for any help.
Robert 


   

 




Re: Spreadsheet::WriteExcel question

2005-05-10 Thread Robert
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:
>>
>> sss
>> 134
>> ABC
>>
>> Where I am looking for rows:
>>
>> s1A
>> s3B
>> s4C
>>
>> 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
>
> 




Re: Spreadsheet::WriteExcel question

2005-05-10 Thread Robert



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:
> 
> sss
> 134
> ABC
> 
> Where I am looking for rows:
> 
> s1A
> s3B
> s4C
> 
> I know it has to do with my "while statement"...I am just not up to speed on
> what.
> 
> Thanks for any help.
> 
> Robert 
> 
> 
> 



Re: Spreadsheet::WriteExcel question

2005-05-10 Thread Amy Farrell
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:
sss
134
ABC
Where I am looking for rows:
s1A
s3B
s4C
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



Re: Spreadsheet::WriteExcel question

2005-05-09 Thread Michael A Chase
On 05/09/2005 12:45 PM, Robert said:
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);
This puts all the columns fetched into one linear array.  For database 
contents:

  row0: s, 1, A
  row1: s, 3, B
  row2: s, 4, C
  @results = ( "s", "1", "A", "s", "3", "B", "s", "4", "C" )
If you want to keep straight which rows are which, you need something 
like this:

  # Use [] to make sure each row is a separate array reference.
  push @results, [ @$row ];
}
my $workbook = Spreadsheet::WriteExcel->new("report.xls");
$worksheet   = $workbook->add_worksheet();
$worksheet->write_row('A2', [EMAIL PROTECTED]);
I can't say what this does because this isn't the Spreadsheet list.
--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


RE: Spreadsheet::WriteExcel question

2005-05-09 Thread Ian Harisay

This is really off topic.

-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:

sss
134
ABC

Where I am looking for rows:

s1A
s3B
s4C

I know it has to do with my "while statement"...I am just not up to speed on 
what.

Thanks for any help.

Robert 





Spreadsheet::WriteExcel question

2005-05-09 Thread Robert
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:

sss
134
ABC

Where I am looking for rows:

s1A
s3B
s4C

I know it has to do with my "while statement"...I am just not up to speed on 
what.

Thanks for any help.

Robert