shilpam has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to create a report which looks like a Calendar for a month. For each day, the cell has some data regarding some activity. These cells need to be colored to be highlighted. In some cases, even the text needs to be in a particular color say red. Moreover, I also want this report to be sent as an attachment (maybe an xls file) in the email. I need help to create this report and which format should I look at for the attachment part. I don't have any problem with the email part.
For e.g. something like -
January 2005
Mon Tue Wed Thur Fri
3 4 5 6 7
Activity 1 Activity 2 Activity 3 Activity 4 Activity 5
  Activity 3      
10 11 12 13 14
Activity 6 Activity 6 Activity 7 Activity 8 Activity 9

Replies are listed 'Best First'.
Re: Creating a Calendar like report
by gellyfish (Monsignor) on Jan 18, 2005 at 12:10 UTC

    YOu might want to look at HTML::Calendar::Simple as this seems to be able to support this kind of stuff. Of course this isn't an xls file, if you must have XLS then you could use Spreadsheet::WriteExcel but of course you will have to work out the calendar layout yourself.

    /J\

      HTML::Calendar::Simple doesn't give the OP the control s/he wants. HTML::Template and Excel::Template are what the user wants. Though, holli is right if the only thing on the HTML is the table and that's the only thing desired in the XLS. If the OP wants a bunch of stuff in the HTML that shouldn't be in the XLS, two separate templates will need to be developed.

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Re: Creating a Calendar like report
by sasikumar (Monk) on Jan 18, 2005 at 11:47 UTC
    Hi

    which format should I look at for the attachment part.

    Use the HTML format. This easy to do as well as can be viewd in all the browsers

    Thanks
    SasiKumar
      I need a excel compatible format.
        HTML is a excel compatible format. Try it out for yourself. Take the html-table you provided above, save it in a .html-file and open that file with excel. YouŽll see that excel displays the contents as a spreadsheet, along with the same formatting your html-table has.

        holli, regexed monk