The following two lines of code are responsible for forcefully downloading the MS Excel file:
<CFHEADER NAME="Content-Disposition" VALUE="inline; filename=stats.xls">
<cfcontent type="application/msexcel"><cfoutput>#Query2Excel(qONEQUERY)#</cfoutput>
How can I avoid that from happening? I would like to this happen when a user clicks on a download button.
Please let me know how to approach. Thanks
Simply have the button point to a page where those two lines are executed.