|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
send data as an excel file
Hi,
Can any one lemme know how to send data in excel sheet using Cold Fusion. Thanks & regards, |
|
#2
|
|||
|
|||
|
You might be able to try this. This will display a query in excel.
<cfquery name="test" datasource="yourdsn"> SELECT first_name, last_name, age FROM students </cfquery> <cfif test.recordcount GTE 66000> Too many records! <cfabort> </cfif> <cffile action="write" file="c:\inetpub\wwwroot\coldfusion\newrockenbach\codesnippet\data.cfm" output=" <cfcontent type='application/vnd.ms-excel'> <table border='1'> <tr> <td>First Name</td> <td>Last Name</td> <td>Age</td> </tr> " addnewline="Yes"> <cfoutput> <cfloop query="test"> <cffile action="append" file="c:\inetpub\wwwroot\coldfusion\newrockenbach\codesnippet\data.cfm" output=" <tr> <td>#trim(first_name)#</td> <td>#trim(last_name)#</td> <td>#trim(age)#</td> </tr> " addnewline="Yes"> </cfloop> </cfoutput> <cffile action="append" file="c:\inetpub\wwwroot\coldfusion\newrockenbach\codesnippet\data.cfm" output="</table> " addnewline="Yes"> <div align="center"> <b>Your report has been generated...<br></b> <a href="data.cfm">Click here to complete the download</a> </div> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > send data as an excel file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|