>- see footer for list info -<
Create the data as a HTML table.
In the main HTML tag, you need to add:
xmlns:x="urn:schemas-microsoft-com:office:excel"
Then, for each particular table cell you can add formatting information:
<td x:str>12345678900000000000</td>
(<td x:str>..<td> = format as a string, not a number)
Finally, use cfheader/cfcontent to tell Excel to open it.
So, putting all that together here is a very basic example:
<cfheader
name="Content-Disposition"
value="inline; filename=report_#DateFormat(Now(),'yyyymmdd')#.xls"
/>
<cfcontent
type="application/vnd.ms-excel"
reset="yes"
/>
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<table>
<tr><th>Preserve String:</th><td x:str>12345678900000000000</td></tr>
<tr><th>Auto-formatted:</th><td>12345678900000000000</td></tr>
</table>
</html>
If you need more than auto-formatting and preserving strings, you'll
have to find the partners to x:str as I don't have them to hand and
I'd only end up Googling, so I might as well let you do that. ;)
On Tue, May 13, 2008 at 3:57 PM, Nick Middleweek
<[EMAIL PROTECTED]> wrote:
> >- see footer for list info -<
> Hello,
>
> Does anyone have any report templates for creating a dynamic Excel file from
> cfm?
>
> I'm preparing my data and using cfloop but am in need for some pointers to
> format the data correctly.
>
>
> Thanks,
> Nick
>
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<