Posto questa interessante pagina di macromedia che spiega come generare un file excel partendo da una visualizzazione html di una query.
Per completezza riporto anche il codice:
<cfsetting enablecfoutputonly="Yes">
<!— Get employee info. —>
<cfquery name="GetEmps" datasource="cfdocexamples">
SELECT * FROM Employee
</cfquery>
<!— Set content type. —>
<cfcontent type="application/msexcel">
<!— Suggest default name for XLS file. —>
<!— "Content-Disposition" in cfheader also ensures
relatively correct Internet Explorer behavior. —>
<cfheader name="Content-Disposition" value="filename=Employees.xls">
<!— Format data using cfoutput and a table.
Excel converts the table to a spreadsheet.
The cfoutput tags around the table tags force output of the HTML when
using cfsetting enablecfoutputonly="Yes" —>
<cfoutput>
<table cols="4">
<cfloop query="GetEmps">
<tr>
<td>#Emp_ID#</td>
<td>#FirstName#</td>
<td>#LastName#</td>
</tr>
</cfloop>
</table>
</cfoutput>
Pingback: Incongruenza dati in Excel prodotti da Coldfusion | MrX
Pingback: Coldfusion e Blob database object | MrX