Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spreadsheet::WriteExcel & worksheet->write

1 view
Skip to first unread message

courtne...@gmail.com

unread,
Sep 25, 2006, 11:54:11 AM9/25/06
to
Hi everyone,

I am grabbing database information using fetchrow() and storing the
results in variables. I need to write these results to an excel
spreadsheet. Does worksheet->write work when you're using variables? It
doesn't seem to like what I'm doing:

$worksheet1->write(0,0,$lastname);
$worksheet1->write(0,1,$platform);
$worksheet1->write(0,2,$balance);

when $lastname, $platform and $balance are the results from the
fetchrow()...
I can print these results OUT to a textfile, so I know they contain
data, but it just doesn't work with the spreadsheet.

Any suggestions?

Thanks,
Courtney

Paul Lalli

unread,
Sep 25, 2006, 12:26:12 PM9/25/06
to

Yes.

First, define what you mean by "doesn't work". What results are you
seeing? No output in the cels? Incorrect output? Program crashes?
Syntax errors? Runtime errors?

Second, post a SHORT but COMPLETE script that demonstrates your
problem. That does not mean to copy and paste your entire script. It
means pare your problem down to the shortest possible script that still
demonstrates your issue.

Third, check the return value of the methods you're using:
my $result = $worksheet1->write(0,0,$lastname);
$result == 0 or die "Could not write to 0,0. Return value: $result\n";

Paul Lalli

0 new messages