Can this be accomplished in Perl?

On a Linux server with a MySQL database, I currently have a Cron job that runs a script containing SQL which creates a CSV file out of specific data frond on tables in the DB.

The current process works fine and is sent to the users as an attachment by email and opens up in Excel on the user's PC.

What I need is to have the background of each cell colorized based on the content except for an initial row that contains column titles.

The file is basically a report of multiple inspection dates for each major section on a piece of company equipment. Currently there are six different type of inspections required. I created a set of colors that represent how soon the inspection needs to be done and if any inspection dates are past due. Now I need to determine how to incorporate the cell-background-color information so the spreadsheet opens with each cell displaying the appropriate background color Excel.

My users are using M/S Office 2002 on XP. Has anyone done this before? If so, can you send me information on how to accomplish this?

Here is a small example of what I currently have in a spreadsheet:
Num Name Inspect1 Inspect2 Inspect3 Inspect4 Inspect5
124 Ron 11/17/2006 11/17/2006 11/17/2006 11/17/2007 8/11/2008
125 Joe 8/1/2006 8/1/2006 8/1/2006 7/25/2007 7/25/2008
140 Mary 3 /4/2006 3/4/2006 3/4/2006 2/10/2007 2/3/2006
207 Ann 2/2/2006 2/2/2006 2/2/2006 2/12/2007 2/12/2010

Thanks,

Tony
[1578 byte] By [tonytis] at [2007-11-19 18:54:09]
# 1 Re: Can this be accomplished in Perl?
Take a look at the Excel modules on CPAN. They should let you do what you're after.
mmetzger at 2007-11-10 3:57:42 >
# 2 Re: Can this be accomplished in Perl?
I'm not sure if I get your problem right.
But you cant save any additional infomations like font-type,color .... in
a csv file.
But as you use M/S Office 2002 you can use xml files which is supported.
Save an excel sheet as a xml File and check-out the structure.
To define a bgcolor is simple in the xml file. The structure is looking like

.........
<Style ss:ID="s21">
<Interior ss:Color="#FF0000" ss:Pattern="Solid"/>
</Style>
........
........
<Cell ss:StyleID="s21"><Data ss:Type="Number">4352435</Data></Cell>
........
........
blueday54555 at 2007-11-10 3:58:53 >