How do I escape commas when importing a CSV?

This isn’t really an Adalo question.

Some of my content, like a paragraph of text, may contain commas. I know there is a technique for manually escaping those commas so they don’t get treat as delimiters. But is there any way to do this automatically?

I read somewhere on this forum that it’s best to create my CSV file in Google Sheets. When I export it to CSV, will Google Sheets handle those punctuation commas correctly?

Looking for advice.

Hi @MikesClub,
Check the CSV format first, usually a CSV can have a separator comma and that can conflict, but an UTF-8 with “;” semi-colon, should work just fine. You can always open the file in excel and save again as CSV.

Is there any software, like Google Sheets, that will simply recognize commas in the text and escape them before the conversion? Seems like that would be an automatic part of the format conversion process.

I am using Airtables
For your task, it is enough to form
into an Airtable table with the required column names. Next, export it from Airtable to a *, csv file and insert your data into this table. After that, import the resulting file into Airtable.
Airtable works well with Adalo and the Airtable API is well documented in the Adalo documentation.

In Excel, use the option:
“save as…” and select “CSV file format UTF-8 (separated by comma)”

When importing natural text as CSV, the commas are read as additional, nonexistent fields and the string is truncated. This presents a challenge since the Adalo database doesn’t recognize any other character as a field delimiter, unlike many other databases. The suggestions posted here didn’t work, so I ended up searching and replacing commas in my raw data file with the :heart: character [ALT + 3] then going into the database after import and manually replacing the :heart:s with commas. With 341 records there were 49 :heart:s to edit. It was pretty fast but larger databases could be a nightmare. The Adalo database has search, it would be nice to have a replace feature as well.

Follow up on this. I’ve found that when I create my initial file using Google Sheets, then export it to a .csv file, any commas in the text are retained and do not function as delimiters. Importing that csv file into an Adalo collection works fine.

I imagine this probably works with other spreadsheet applications too, like Excel.

I didn’t find that to be the case but could have played around with it a bit more.

Just so users know, any field that has a comma in it will get truncated at the comma on export as well. Bloody hell. There needs to be a routine that replaces commas with some character, like :heart:, that is easy to search and replace both on import and during export. Or, better yet, allows a customized field delimiter. It’s not like commas don’t appear in real language.

1 Like