I am having a problem with the formatting of a an export file
to Excel, which is created by a Coldfusion page. My export file
contains numbers that need to be formatted as text. I found the
style code below on this forum, but I am not having any luck with
it. I tried adding it to my style file or directly as style
formatting on the export page, but neither one of the two are
getting recognized.
Is there anything else I need to code before this works? Your
help is greatly appreciated. Thanks,
Rose
<html>
<STYLE TYPE="text/css">
TD {
mso-number-format:\@;
}
</style><body>
<!---<cfheader name="Content-Disposition"
value="inline; filename=Exportdata1.xls">--->
<cfcontent type="application/vnd.msexcel">
<cfheader name="Content-Disposition" value="inline;
filename=export.xls">
<cfquery name = "getclub" datasource="#DSN#">
Select mail_name name,…
</cfquery>
<table width="200" border="2">
<cfoutput query='getclub'> <tr>
<td>#customer#</td>
…
<td>#dateformat(begin_date,'mm/dd/yyyy')# -
#dateformat(end_date,'mm/dd/yyyy')#</td>
…
</tr></cfoutput>
</table>