Once again I find myself running to you for help! Boy am I glad you're
here!
Okey doke; I want to push the results of a query out to a delimited list (or
excel, or ms word) such that someone can click on a link and download a .txt
(.xls, .doc) file.
I'm able, using cfcontent tag to create a list and make it available for
download as a .cfm file. How do I get it to download as a .txt (.xls,
.doc)?
Here's the code for my test page:
<.!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<.cfparam name="do" default="not yet">
<.cfif DO is not "not yet">
<.cfcontent type="application/msexcel">
<.CFQUERY NAME="qryCountries" DATASOURCE="Country">
SELECT PK, CC, Country
FROM dbo.tblCountries
"PK","CC","Country"
<.cfoutput query="qryCountries">
"#PK#","#CC#","#country#"
<./cfoutput>
<./cfif>
<.html>
<.head>
TESTER
<./head>
<.body>
here's a test of the cfcontent tag.
<.a href="testpage.cfm?do=now">Country Codes
<./body>
<./html>
This pulls a list of countries with their codes in a comma delimited list
but tries to save it as "testpage.cfm" not .txt (or .xls as you'd expect
from the mimetype of msexcel).
Thanks in advance for all your help,
David
David Sampson
Analyst/Programmer II
AK Department of Education & Early Development
[EMAIL PROTECTED]
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4