2 Replies Latest reply on May 7, 2007 2:14 PM by silviasalsa

    address variable that holds more than one fields to downloadable CSV excel file

    silviasalsa Level 1
      Hello I have this code that converts a regular document to a downloadable CSV excel file
      And it works great:
      <cfcase value="CSV">
      <CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=Property.csv">
      <cfcontent type="application/csv">"CalNUM","PEENUM”
      <cfloop query="getGPAZCCases"><cfoutput>"#ltrim(CalNUM)#","#PEENUM#"

      .
      My goal is to add the address field that composes of these fields below:

      #ST_no#
      #ST_DIR#
      #ST_Name#
      #st_suffix#"
      so I added this like the code below.


      <cfcase value="CSV">
      <CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=Property.csv">
      <cfcontent type="application/csv">"CalNUM","PEENUM”
      <cfloop query="getGPAZCCases"><cfoutput>"#ltrim(CalNUM)#","#PEENUM#"


      Unfortanetly it has not worked out.

      If I do have a CFSET to declare a variable to hold the address field like so:
      <CFSET address=(" #ST_no# ", " # ST_DIR# ", "# ST_Name # ", " # st_suffix #
      ")">
      Where do I put it in the existing codei have below?
      Thanks in advance.


      <cfcase value="CSV">
      <CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=Property.csv">
      <cfcontent type="application/csv">"CalNUM","PEENUM”
      <cfloop query="getGPAZCCases"><cfoutput>"#ltrim(CalNUM)#","#PEENUM#"