Question
Removing Quotes from strings
I am creating a CSV file using CF, well at least I'm trying
to, I'm having all sorts of issues with format.
Can anybody point me to the correct format for a CSV? Should the fields be surrounded by quotes for example?
One problem is that if any of the fields contain commas or quotes, it messes up in Excel when I open the file.
What I need to do is remove all quotes and commas. I had no trouble removing commas, but when I remove quotes it does not remove all of them, and then the data is out of alignment in the cells.
I use this -->
<CFSET lead_a1_1 = #replacenocase(getdata.lead_a1,",","","all")#>
followed by this
<CFSET lead_fn = #replacenocase(lead_fn,"""","","all")#>
I am sure this could also go into one expression?
appreciate any help with removing all these quotes and commas, and also pointers for the correct CSV format for Excel. Btw I don't want to output in the browser but actually create a .CSV file
Thanks
Mark
Can anybody point me to the correct format for a CSV? Should the fields be surrounded by quotes for example?
One problem is that if any of the fields contain commas or quotes, it messes up in Excel when I open the file.
What I need to do is remove all quotes and commas. I had no trouble removing commas, but when I remove quotes it does not remove all of them, and then the data is out of alignment in the cells.
I use this -->
<CFSET lead_a1_1 = #replacenocase(getdata.lead_a1,",","","all")#>
followed by this
<CFSET lead_fn = #replacenocase(lead_fn,"""","","all")#>
I am sure this could also go into one expression?
appreciate any help with removing all these quotes and commas, and also pointers for the correct CSV format for Excel. Btw I don't want to output in the browser but actually create a .CSV file
Thanks
Mark
