CSV files

Primer on CSV files

Comma-separated values (CSV) is a text-file format for storing tabular data, where each line is a record, and each record is divided into fields delimited (separated) by a specific character, usually a comma. Medallia Experience Cloud imports and exports data in CSV format, among other formats. Experience Cloud follows adheres to RFC 4180, which is a standard that defines the format of the file.

At the minimum, a CSV record looks like this:
aaa,bbb,ccc

However, many systems expect some or all fields to be enclosed in quotes, like this:

"aaa","bbb","ccc"
A common format is to include text values in quotes, and literal without quotes:
"aaa",123,"ccc"
Important: Regardless of the delimiter character used, or whether or not fields are enclosed in quotes, all records should have the same number of fields, and the fields should be treated the same way in each record (enclosed in quotes or not).

Quotes, commas, and line-breaks in field data

When a field value contains a comma or a line-break, that field must be enclosed in quotes. In the example, the first file contains a comma, and the third field has a line-break:
"aaa, mmm",123,"bbb

more bb","ccc"
When a field contains a double-quote, enclose the field in double-quotes, and escape the internal quote by preceding it with another double-quote, like this:
"aaa ""mmm",123

Delimiters

Instead of a comma (,), some systems use an alternative delimiter character, typically a semi-colon (;) or tab. When importing or exporting CSV, be sure to specify the expected delimiter.