ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old October 25th, 2003, 10:08 AM
shalitkg shalitkg is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 shalitkg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
send data as an excel file

Hi,
Can any one lemme know how to send data in excel sheet using Cold Fusion.

Thanks & regards,

Reply With Quote
  #2  
Old October 26th, 2003, 09:00 AM
jrockfl jrockfl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 5 jrockfl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > send data as an excel file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway