I'm creating an excel file with .csv extension and items are appearing in a horozontal row. How can I add CRs list vertically?
<cfset itemcnt=1>
<cfloop query="xlist">
<cfif itemcnt is 1>
<cfset txtout='"#agreenum#"'>
<cfset itemcnt=2>
<cfelse>
<cfset txtout=txtout&',"#agreenum#"'>
</cfif>
</cfloop>
<cffile action="Write" file="#outfile#" output="#txtout#">
<cfset itemcnt=1>
<cfloop query="xlist">
<cfif itemcnt is 1>
<cfset txtout='"#agreenum#"'>
<cfset itemcnt=2>
<cfelse>
<cfset txtout=txtout&',"#agreenum#"'>
</cfif>
</cfloop>
<cffile action="Write" file="#outfile#" output="#txtout#">