cfsavecontent
Hi,,
I am query from my table and want to save this query results into excel file in to specific location.
1. Is there the way to overrite the file each time the page is run?
2. when open the myReport.xls, i got message: The file you are trying to open "myReport.xls" is in diffrent format than specific the file extension.
3. I then change myReport.xls to myReport.xlsx then run the page to get new file and sitll got diffrent error when open it : This file can't be previewed because of error in MS Excel previewever.
4. If i change myReport.xls to myReport.csv then create the file again, and re-open and it show no mesage but it shows all HTML attribute (td, tr, table). How can i save the resust into csv file?
What can i do not having either one of message ablove when i open the file? i am using MX excel 2010 version. Woul you pls advice this?
Thanks
<cfsavecontent variable="saveContent1">
<cfcontent type="application/msexcel">
<cfheader name="Content-Disposition" value="filename=report/myReport.xls">
<table cols="4" border="1">
<tr>
<td>sale</td>
<td>delivery</td>
</tr>
<cfloop query="q_sale">
<tr>
<td>#sale#</td>
<td>#del#</td>
</tr>
</cfloop>
</table>
</cfoutput>
</cfsavecontent>
<cffile action="write" mode="777" output="#saveContent1#" file="D:Inetpub/myapps/report/myReport.xls">
