Geez, I always just use the cffile tag with the write and then append actions. and you can access a .csv through the web, so you can just use that extension. Rob
On Wed, Nov 5, 2008 at 8:20 PM, Mike Chabot <[EMAIL PROTECTED]> wrote: > If you get rid of cfconent then load the page in a browser does it > render as a normal CF page such that if you view source you see > exactly the content that you expect to see in a CSV file? > > If it is a text file then use a regular line break instead of a BR tag. > > -Mike Chabot > > On Wed, Nov 5, 2008 at 8:08 PM, Toby King <[EMAIL PROTECTED]> wrote: > > I have a program - very simple to query a db and geta result set and > save to a CSV verything seemend to work OK initially but when I run the > program now I keep getting a message cannot download the .cfm file. > > > > Here is the code. > > > > <cfquery name="getUsers" datasource="#request.AppDS#"> > > SELECT * > > FROM Users > > order by lastname > > </cfquery> > > > > <!--- Now output as simple comma-separated text ---> > > <!--- Put the column names on first line, then ---> > > <!--- the actual data rows on their own lines ---> > > > > <cfheader name="Content-Disposition" value="Attachment; > filename=scusers3.txt"> > > > > <cfcontent type="text/plain">"Title","FirstName","LastName","Email"<br > /><br /> > > <cfoutput > query="getUsers">"#Title#","#FirstName#","#LastName#","#Email#"<br > /></cfoutput> > > > > > > THanks in advance for any feedback. > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314895 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

