This is how I did it:
<cfset output = "">
/*** The spaces in the next line of code are not spaces, they're tabs
***/
<cfset output = output & "Overnite/Next Day Request Date Dealer
Office Dealer Name Address1 Address2 Address3
City State Postal Code Repid Reason Statements Sheets
Images Comments">
<cffile action="write" file="#request.excelfilepath#"
output="#output#"
nameconflict="overwrite">
<cfloop query="getreprints">
<cfset output = "">
/*** Again, not spaces, but tabs ***/
<cfset output = output & "#yesnoformat(overnite)#
#dateformat(requestdate,'mm/dd/yyyy')# #trim(dealeroffice)#
#trim(dealername)# #trim(address1)# #trim(address2)#
#trim(address3)# #trim(city)# #trim(state)#
#trim(postalcode)# #trim(repid)# #reason# #statements#
#sheets# #pages# #trim(comments)#">
<cffile action="append" file="#request.excelfilepath#"
output="#output#">
</cfloop>
Hope that helps.
Mark
-----Original Message-----
From: Mookie Bear [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 3:27 PM
To: CF-Talk
Subject: Writing to text file
hey guys, I am doing a CFFILE and writing to a NEW file (not appending).
i
am tyring to input information in text delimited from a query. how do I
do
this though? i cannot put CFOUTPUT query="whatever" inside the
output.
help!
_________________________________________________________________
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists