Skip to content
BENIBIX Learn

Comma-Separated Values (CSV)

Development📄 Files & FormatsData Formats

Also known as CSV, CSV file

A table in plain text. Each row is one line, and commas split the columns.

Think of it like

Think of it like a table drawn with commas instead of lines. Each row is a line, and commas split the boxes.

Example

Lucy exports her shop's 1,200 orders as a CSV file. Her accountant opens it straight away in a spreadsheet.

Why it matters

CSV is the easiest way to move a table between programs. Almost everything can read it.

Definition

CSV is a plain text file that holds a table. Each line is one row, and commas split the row into columns. The first line usually holds the column names. Every spreadsheet app can open and save CSV, and so can most databases. It is simple, but it has no types: a number and a word look the same.

Example code

csv
name,age
Ada,36
Sam,29
A header line, then one person per line.

Common mistake

Not putting quotes around a value with a comma in it. The row then splits into too many columns.

Key takeaways

  1. 1
    One row per line. Commas split the columns.
  2. 2
    Header first. The top line names the columns.
  3. 3
    No types. Everything is read as text.

Learn it properly