This content has been marked as final. Show 4 replies
Make the query a session variable. When the user clicks the button, take them to another page where you can use cfheader and cfcontent to export to excel.
Try adding the header
<CFHEADER NAME="Content-Disposition" VALUE="attachment; FILENAME=resultFiles.xls">
to the file and try. This will open the output file as an Excel document.