Home > Archive > PERL Beginners > July 2007 > Serious Problem while appending an Excel file
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Serious Problem while appending an Excel file
|
|
| thanawala27@gmail.com 2007-07-24, 9:59 pm |
| Hi guys,
I had a problem while writing into an Excel file.
What i want to do is:
i want to write the contents of 2 variables in one cell of the Excel
field.
to write the contents of one variable, i use
$worksheet->write_string($row, $col, $value1, $format);
this works fine.
but to write 2 variables, if i use the following code then the 2nd
variable is overwritten on the first one.
$worksheet->write_string($row, $col, $value1, $format);
$worksheet->write_string($row, $col, $value2, $format);
is there any way of appending a cell by another variable? So we can
write the first variable, n then append the second variable.
It would be nice if some1 could help me out.
Any Help is appreciated.
Thank You
| |
| Chas Owens 2007-07-25, 7:59 am |
| On 7/24/07, thanawala27@gmail.com <thanawala27@gmail.com> wrote:
snip
> $worksheet->write_string($row, $col, $value1, $format);
> $worksheet->write_string($row, $col, $value2, $format);
snip
> is there any way of appending a cell by another variable? So we can
> write the first variable, n then append the second variable.
snip
Use string interpolation:
$worksheet->write_string($row, $col, "$value1$value2", $format);
|
|
|
|
|