How to remove a carriage return from a long text field for a csv file

Hello I have data generating from a table onto a csv file and it appears there’s a carriage return being entered in a Note field (long text) distorting the csv file.

How can we remove the carriage return so that it appears as simple text? Will changing it to a normal text box do the trick and if yes, how many characters can the user input into a text field vs. the long text?

0 8 2,441
8 REPLIES 8

Steve
Platinum 4
Platinum 4

Yep, that would be a problem…

Yes. I believe the newline will be replaced with a space, but you should confirm.

I don’t believe there’s a limit. To my knowledge, the only difference between Text and LongText is that LongText allows newlines where Text does not.

Hi Steve, looks like changing the field to TEXT will eliminate the users ability to utilize carriage return formatted text moving forward.

Will need to find a way to remove the carriage return from google sheets for the historical info. Pls let me know if you know of a way. I believe find/replace Ctrl J works in excel. Will try it in sheets.

Thanks Steve as always!

Are you using a template to generate the CSV file?

Yes

You could try to address the newline in the template by replacing the column reference with a SUBSTITUTE() expression that replaces it with something else:

<<SUBSTITUTE([Note], "
", " ")>>

Sorry Steve can’t tell if the first set of quotes contains a space?

The first line is <<SUBSTITUTE([Note], "; the second line is ", " ")>>.

How to remove carriage returns from Google Sheets (from our friends at Stack Overflow)

Top Labels in this Space