in reply to Re^2: Date column in excel
in thread Date column in excel

If I ever need to figure out how to do this, I start by creating a simple Excel sheet, do "Save as HTML" or whatever, and see how Excel has saved it.

Just did a quick test and it looks like the HTML format is:

<td height=17 class=xl24 align=right style='height:12.75pt' x:num="38018">01/02/2004</td>

So you probably need to convert the date into numeric form (shouldn't be too difficult - but you'll need to check Excel's documentation to find its epoch, as that will most likely not be the same as perl's) for the x:num attribute...

Update: I should add that if you're doing lots of this and you want it to be robust, you ought to look into a ready-made solution, such as Spreadsheet::WriteExcel. I've only ever needed to do this very occasionally, and so I've never actually looked properly at what modules are available...

s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;