• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

cffile output syntax problem... simple but showstopper

I am creating a csv file from recordset. Its complete but for a problem with the header.

I need the header line to be    "name","mobile"

All I can achieve is         name,mobile        (ie can't get the ""'s)

This is the code I currently have.  Can anyone tell me what the output line should be ?

Many thanks for any help

<cffile
action="WRITE"
addnewline="Yes"
file="C:\ColdFusion9\wwwroot\Office_12\MOBLECSV\smsMobile.csv"
output="name,mobile">
0
jameskane
Asked:
jameskane
1 Solution
 
SidFishesCommented:
this worked for me

<cffile
action="WRITE"
addnewline="Yes"
file="C:\temp\smsMobile.csv"
output="""name"",""mobile""">
0
 
jameskaneAuthor Commented:
Perfect. Many thanks.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now