cfsavecontent
hi,,
i query table , want save query results excel file in specific location.
1. there way overrite file each time page run?
2. when open myreport.xls, got message: file trying open "myreport.xls" in diffrent format specific file extension.
3. change myreport.xls myreport.xlsx run page new file , sitll got diffrent error when open : file can't previewed because of error in ms excel previewever.
4. if change myreport.xls myreport.csv create file again, , re-open , show no mesage shows html attribute (td, tr, table). how can save resust csv file?
what can not having either 1 of message ablove when open file? using mx excel 2010 version. woul 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">
what version of coldfusion using? should using spreadsheet operations create excel files.
all doing here saving html file, , sving xls extension. doesn't make xls file, makes incorrectly named.
--
adam
More discussions in Getting Started
adobe
Comments
Post a Comment