How to replace a line-break in the textarea by a <br>.
When the table is imported in Excel, I want all the line-breaks in the textarea be replaced by a space.
Otherwise all content will be spread over different rows in Excel.
I could manage in the older versions of CF but wondering how to do it in CF5.
Thanks in advance,
Tico
Hi Bob,
This is not exactly what I meant.
I will try to explain more.
When I import the CSV export into Excel the textarea is the problem. Whenever the subscriber uses an 'Enter' (carriage return) in the textarea it shows in Excel in more than 1 cell. What I would like is the whole textarea text in 1 cell.
So instead of:
thanks.
greetings.
I would like to see:
thanks. greetings.
Can you help me?
Tico
Hi Tico,
The post I linked to answers this question How to replace a line-break in the textarea by a <br>.
To use spaces instead I'd suggest that you add a couple of extra lines. One to replace <br /> with a space and the second to replace a double space with a single space to tidy up a bit.
Though IMHO you are better to stick with the <br />
Bob
Hi Bob,
still I am searching for a way to get rid of the line breaks (carriage return) in the text area.
In your CFv4 CSV Export (GH) action you added :
" Added option to remove carriage return and newline characters for Excel exports."
that worked perfectly in CFv4 and that's what I am looking for in CFv5.
I already set a maxlength of characters but people keep on using the carriage return and it messes up the excel report.
Can you help me please,
thanks,
Tico
Hi Bob,
thanks and it works great.
Problem solved for me.
Tico