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.
    SEMrush
     
    catbollu@msn.com, Oct 18, 2005 IP
    SEMrush
  2. durango

    durango Guest

    Messages:
    83
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could use the CFCONTENT tag to do something like this:

    
    <cfsilent>
      <cfquery datasource="MyDatasource" name="MyQuery">
        select * from table
      </cfquery>
    </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