1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

exporting data to a comma dilimeted file

Discussion in 'Programming' started by catbollu@msn.com, Oct 18, 2005.

  1. #1
    Is there a way with coldfusion to take data and export to a comma delimited file. I would use excel but too much data.
    catbollu@msn.com, Oct 18, 2005 IP
  2. durango

    durango Guest

    Likes Received:
    Best Answers:
    Trophy Points:
    You could use the CFCONTENT tag to do something like this:

      <cfquery datasource="MyDatasource" name="MyQuery">
        select * from table
    </cfsilent><cfcontent type="text/csv"><cfheader name="Content-Disposition" value="attachment; filename=export.csv">
    <cfoutput query="MyQuery">#column1#,#column2#,#column3##Chr(13)#</cfoutput>
    Code (markup):
    durango, Oct 18, 2005 IP