Hi there - I’m new to ColdFusion and also new here.
I’m trying to write a file direct to a browser.
Everything seems fine apart from the fact that I cannot get rid of CRLF on long fields
My code looks something like
<cfset tab = Chr(9)>
<cfset newline = Chr(13) & Chr(10)>
<cfoutput>#ProdId##tab#</cfoutput>
<cfoutput>#Description##tab#</cfoutput>
<cfoutput>#LongDescription##tab#</cfoutput>
<cfoutput>#unitPrice# GBP#tab#</cfoutput>
<cfoutput>#unitPrice1# GBP#tab#</cfoutput>
<cfoutput>#deliveryPrice# GBP#tab#</cfoutput>
<cfoutput>#Qty##tab#</cfoutput>
<cfoutput>#newline#</cfoutput>
The line
#newline#
is there to add a CR+LF at the end of each row,
But as some fields are very long (LongDescription) I get CR+LF added as per below image
I want the first CRLF but not the second one.
Any ideas how to achieve this?
Many thanks