vxp has asked for the wisdom of the Perl Monks concerning the following question:
my problem is those last 2 lines right there. i cant hardcode those values, this script is supposed to write in a different cell each day.. 3, 0 and 3, 1 are today, for example. 4, 0 and 4, 1 are tomorrow. etc help, please.#!/usr/bin/perl use Spreadsheet::WriteExcel; my $day = (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday)[( +localtime)[6]]; my $month = (January, February, March, April, May, June, July, August, + September, October, November, December)[(localtime)[4]]; my $date = (localtime)[3]; my $workbook = Spreadsheet::WriteExcel->new("test.xls"); my $worksheet = $workbook->addworksheet('3rd Quarter 2002'); my $format = $workbook->addformat(); $format->set_bold(); $worksheet->write(2, 0, 'Date', $format); $worksheet->write(2, 1, 'Day', $format); $worksheet->write(2, 2, 'AOL', $format); $worksheet->write(2, 3, 'MSN', $format); $worksheet->write(2, 4, 'Katrillion', $format); $worksheet->write(2, 5, 'CS', $format); $worksheet->write(2, 6, 'Daily Total', $format); $worksheet->write(2, 7, 'AOL Weekly', $format); $worksheet->write(2, 8, 'Mo. Run Total', $format); $worksheet->write(2, 9, '% change', $format); $worksheet->write(3, 0, "$month $date"); $worksheet->write(3, 1, $day);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need help with a loop (i think)
by reyjrar (Hermit) on Aug 20, 2002 at 15:11 UTC | |
by vxp (Pilgrim) on Aug 20, 2002 at 15:14 UTC | |
by waswas-fng (Curate) on Aug 20, 2002 at 15:28 UTC | |
by Mr. Muskrat (Canon) on Aug 20, 2002 at 21:51 UTC | |
by reyjrar (Hermit) on Aug 20, 2002 at 16:27 UTC | |
|
Re: Need help with a loop (i think)
by splitOnce (Acolyte) on Aug 20, 2002 at 15:38 UTC | |
|
Re: Need help with a loop (i think)
by vxp (Pilgrim) on Aug 20, 2002 at 16:25 UTC |