473,472 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Download to excel

29 New Member
Hi,

I need to download some data into an excel. I am using the following code but it is not working.
Expand|Select|Wrap|Line Numbers
  1. <cfif Form.ExcelLink is "on" >
  2.     <cfset TabChar = Chr(9)>
  3.                 <cfset NewLine = Chr(13) & Chr(10)>
  4.     <cfcontent type="application/msexcel" >
  5.                 <cfheader name="Content-Disposition   value="filename=Result.xls">  
  6.     <cfloop
  7.                  query="myquery" >
  8.                  <cfoutput>#myquery.CurrentRow##TabChar##DateFormat("#week#","yyyy/mm/dd")##TabChar#
  9.                    #Evaluate(ADD+DISCONNECT)##TabChar#
  10.                          #LSNumberFormat(Evaluate(Abs("#TYPE#"/(ADD+DISCONNECT)*100)),".__")##NewLine#
  11.                          </cfoutput>
  12.  
  13.                          </cfloop>
  14. </cfif>
  15.  
TYPE, ADD and DISCONNECT are obtained from query.


Please help
Resmi318
Aug 10 '07 #1
1 4169
acoder
16,027 Recognized Expert Moderator MVP
See the third example in the documentation for cfcontent.
Jan 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: MS | last post by:
We have to provide a facility on the client machines to download the data visible on a ASP page into an excel sheet. We are using WIN2k clients connected to WIN2k server with IE6.0 installed. ...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
4
by: Ali | last post by:
I need a functionality where my clients download Excel files and after they do, I do some processing. Downloading is easily achieved using a anchor or hyperlink tag, but that does not give me the...
5
by: ad | last post by:
I use the code below to export the content of a data set to Excel, the code come form http://www.dotnetjohn.com/articles.aspx?articleid=36 It will take a long time to dolwnload if the excel...
3
by: David Reynolds | last post by:
Does anyone know how I could stream Excel to the browser for download without saving the file somewhere first. I wasn't sure how I would go about it.
0
by: Rhys666 | last post by:
Basically I have a link that opens my download page and the querystring identifies the type of 'template' Excel spreadsheet has asked to download. The download page reads the querystring,...
1
by: George Homorozeanu | last post by:
We create an excel object with Excel/Office Interop Assembly and we want to offer this excel object as download without creating physically the file. The download window appears with "Save As.",...
2
by: barthelemy.von.haller | last post by:
Hi all, I googled and read this group but could not find any solution to my problem. I have a page to download big excel files that we 'build' on the server side. When a user click on the...
2
by: nandishp | last post by:
We need to automate download of Reports from Oracle CRM OnDemand. The reports in Siebel CRM OnDemand can be downloaded in the form of Excel, CSV, etc. We have a task of downloading several such...
15
by: patf | last post by:
Hi - experienced programmer but this is my first Python program. This URL will retrieve an excel spreadsheet containing (that day's) msci stock index returns. ...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.