doc/user/project/repository/files/csv.md
{{< details >}}
{{< /details >}}
A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separator is the source of the name for this file format. A CSV file typically stores tabular data (numbers and text) in plain text, in which case each line has the same number of fields.
The CSV file format is not fully standardized. Other characters can be used as column delimiters. Fields may or may not be surrounded to escape special characters.
When added to a repository, files with a .csv extension are rendered as a table when viewed in
GitLab:
GitLab uses the Papa Parse library to parse CSV files. This library follows RFC4180 and has strict formatting requirements that can cause parsing issues with certain CSV formats.
For example:
,) separators and double quotes (") can cause parsing errors.The following format causes parsing errors:
"field1", "field2", "field3"
The following format parses successfully:
"field1","field2","field3"
If your CSV file doesn't display correctly in GitLab:
"), ensure the double quotes and comma (,) separators are immediately adjacent, with no spaces in between.").These parsing requirements only affect the visual rendering of CSV files and do not impact the actual file content stored in your repository.