Exporting a view to CSV and quotation marks

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

Self-hosted

If you are self-hosting, what version of Baserow are you running?

version 1.35.0

If you are self-hosting, which installation method do you use to run Baserow?

Docker Engine v28.1.1

What are the exact steps to reproduce this issue?

When exporting a view to CSV, quotation marks are doubled for text that already contained quotation marks.

Hi @gletterpost, this is expected behaviour. When exporting to CSV, text fields that contain special characters like quotation marks need to be escaped to maintain data integrity.

For example, if your original text is: Hello "world" The CSV export will show: "Hello ""world"""

Using an alternative character instead of quotation marks, such as “|” would solve the problem. There’s a similar setting for selecting “Column Separator” when exporting.

Column separator and escaping characters are 2 very different things though. This method is the CSV standard (RFC 4180). It wouldn’t make much sense to use a different character to escape the quotes.

What is the exact issue you are facing with this, perhaps there is a resolution I could suggest?

I need to get the original

Replacing two quotes with one will not help, since in some places one quote is added

.

I’m not sure I follow. If the issue is with double quotes then doing a find and replace with any text editor for finding ”” and replacing with ” should give you the exact result. In my example of "Hello ""world""" that would result in the original of Hello "world".

Could you share an example from your data where this is not the case?

Was

It became

this won’t work

I don’t understand how it goes from Hello to ”Hello. This should not be possible. It should only go from Hello to ”Hello”.

Can you share your example csv with me via DM?

Your example already shows what is happening.

Quotation marks enclose not only the word within the quotation marks, but the entire text as a whole.
I can replace “” with ", but how do I remove the added single "?

You could do it in 2 stages. You could first replace all ““ double quotes with something else, then remove singles and then doulbe back and remove the characters you repalced the doubles with.

1 Like

Great solution! I was thinking of replacing the quotes before exporting to CSV and then putting them back. Your solution is better. Thanks!