W
Warrick FitzGerald
Hi All,
I'm trying to dynamically create worksheets using Spreadsheet::WriteExcel.
I'm looking through a log file and would like to create a worksheet for
each date.
In all example I can find you simply do:
$mySheet = $workbook->addworksheet("somename");
then to add data to that you simply do:
$mySheet->write(....);
That works great until I try to dynamically create $mySheet.
--------------
This is what I tried.
$date = $Fields[0]; <--- Get the date from the Logfile
${$date} = $workbook->addworksheet($date); <-- This created the workbook
for each date. date is of course formatted to be excel friendly name.
My problem come when trying to call the write method on my dynamic name.
${$date}->write(...) does not work ?
%{$date}->write(...) does not work ?
I have tried everything I can think of. Can someone please tel me how I
can call the write method on a dynamically named worksheet?
Thanks
Warrick FitzGerald
I'm trying to dynamically create worksheets using Spreadsheet::WriteExcel.
I'm looking through a log file and would like to create a worksheet for
each date.
In all example I can find you simply do:
$mySheet = $workbook->addworksheet("somename");
then to add data to that you simply do:
$mySheet->write(....);
That works great until I try to dynamically create $mySheet.
--------------
This is what I tried.
$date = $Fields[0]; <--- Get the date from the Logfile
${$date} = $workbook->addworksheet($date); <-- This created the workbook
for each date. date is of course formatted to be excel friendly name.
My problem come when trying to call the write method on my dynamic name.
${$date}->write(...) does not work ?
%{$date}->write(...) does not work ?
I have tried everything I can think of. Can someone please tel me how I
can call the write method on a dynamically named worksheet?
Thanks
Warrick FitzGerald