Thursday, March 6, 2008

Excel file with CFcontent

It is extremely easy to give your customers access to an Excel file containing their data.

The key is a nicely formatted HTML table, with correctly placed cfheader/cfcontent tags.
Consider the following example:

<cfsetting showdebugoutput="no">
<cfheader name="Content-Disposition" value="attachment;filename=""My File Name.xls""">
<cfcontent type="application/msexcel;charset=utf-16">

If you have any other tips or ideas feel free to share them!

No comments: