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);
In reply to Need help with a loop (i think) by vxp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |