Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 7th, 2003, 07:17 PM
sweetmoon sweetmoon is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 11 sweetmoon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question query results in Excel

Results of Query In Ms-Excel

Hi,

After we query the data from the query, i want the results to be projected in MS-Excel which opens up in browser!


How do we do this? Can Anyone Help?



~SweetMoon~

Reply With Quote
  #2  
Old October 21st, 2003, 11:50 PM
CF_DEVE CF_DEVE is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Sri Lanka
Posts: 4 CF_DEVE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to CF_DEVE
Yo can export to excell in the following way,
1. get the details,

<CFQUERY NAME="qry1" DATASOURCE="#Application.DS#" username="#Application.User#" password="#Application.PW#">
Select field1, field2
From table1
</CFQUERY>

2. Set the fromat you want to appear in the excel sheet,

<!--- set variables for special characters --->
<cfset TabChar = Chr(9)> <cfset NewLine = Chr(13) & Chr(10)>
<cfset f_name = "filename.xls">
<!--- set content type to invoke Excel --->
<cfcontent type="application/msexcel">
<cfheader name="Content-Disposition" value="filename=#f_name#">

<cfoutput>fieldName1#TabChar#Fieldname2#NewLine#</cfoutput>
<cfloop query="qry1">
<cfoutput>#field1##TabChar##field2##NewLine#</cfoutput>
</cfloop>
<cfabort>

try this this will work for u, I guess.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > query results in Excel


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap