Vishnu
I had to do the same (with the help of someone else on this list) for test
gathering a while back,
and someone on this list was nice enough to help. Hopefully the following
code will give you some
ideas. As I remember this acts a little different with NS and IE. I also
save the info to a local file
for back up.
In general the idea is to sen the output to a file using CFHEADER and CFCONTENT
I believe file has to be in the d:/Inetpub/wwwroot/..... format
Good Luck,
Nick
Step 1 Extract data
<CFQUERY NAME="GenerateExcel" DATASOURCE="WhereDataIs">
</CFQUERY>
Step 2 Determine browser
<cfif ReFind("MSIE",cgi.HTTP_USER_AGENT)>
<cfheader name="Content-type" value="unknown">
<cfelse>
<cfheader name="Content-type" value="application/msexcel">
</cfif>
Step 3 Output
<cfheader name="content-disposition" value="attachment;
filename=#ExcelFileName#">
<CFCONTENT TYPE="application/msexcel" reset="yes">
<cfoutput query="GenerateExcel">
Output formated data
</cfoutput>
At 11:39 AM 1/17/2005, you wrote:
>Hi Friends
>i want to save the data return by the cfquery into excel . and give link
>to downlaod the excel file or save dailog box should open to save the file
>in excel format
>
>i tried in may ways . its display the data in the browser but not able to
>downlaod as excel
>
>pls suggest me how to do this
>
>Thanks in advance
>vishnu
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191079
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54