What Is a CSV File? Moving Customer Lists Between Apps

A plain-text table with one record per line and commas between fields, used to move lists like customers and contacts from one app to another.

What a CSV file is

CSV stands for comma-separated values. A CSV file is a plain-text table: each line is one record, like one customer, and commas separate the fields in it, like name, phone and email. Spreadsheets, CRMs, phone systems and contact apps can all save and open it, which makes it a common way to move a list from one app to another.

The IETF's RFC 4180 documents the format most programs follow, while noting that there's no single formal specification, so different programs read and write CSV a little differently.

How a CSV file is laid out

RFC 4180 describes a few rules that most files follow.

  • Each record sits on its own line.
  • An optional header line comes first and names the fields, with the same number of fields as the records below it.
  • Fields are separated by commas, and the last field on a line isn't followed by one.
  • A field that contains a comma, a double quote or a line break is wrapped in double quotes, and a double quote inside it is written twice.

So a customer whose notes say Gate code 4, side door would be written with the notes in quotes, or the comma would split it into two fields.

Getting a CSV out of your old system

Look for an export option in your old app, such as in its settings, reports or customer list. Google Contacts, for example, lets you export some or all contacts as a CSV or vCard file to move them to another account, and Google CSV is the option it names for backing them up.

  • Export everyone, not just the current page or filter.
  • Open the file in a spreadsheet before importing to check the columns and spot rows with no name or number.
  • Keep the original file untouched and make changes in a copy.

Common import problems

Watch for these before you import.

  • No header row, so the app can't tell which column is the phone number.
  • Names split across first and last name columns in one file and combined in another.
  • Phone numbers saved by a spreadsheet as plain numbers, which can drop a leading digit or symbol.
  • Separators other than commas, such as semicolons or tabs, which some programs use.

Importing customers into Captivite

On Customers, press Import and pick a CSV file, like an export from your old phone system, your CRM or your phone's contacts. Files separated by semicolons or tabs work too.

  • The first row should name the columns. Captivite guesses which is the name, or first and last name, phone, email and notes, and you can change its guesses before importing.
  • It shows how many rows are ready and how many can't be imported: no name, number or email, or a number that isn't one.
  • Customers already there with the same number or email are left as they are, so importing the same file twice is safe. Up to 5,000 rows a file.
  • Importing someone doesn't give you permission to text or call them: record their permission on their Texts and calls if they've given it.

Questions

How do I open a CSV file?

Any spreadsheet app, such as Excel, Google Sheets or Numbers, opens a CSV file as a table. Because it's plain text, a text editor opens it too, showing the commas between fields.

What's the difference between a CSV file and an Excel file?

A CSV file is plain text holding one table of values, with no formatting, formulas or extra sheets. An Excel file can hold all of those.

Why does my CSV import put data in the wrong columns?

Check for a field that contains a comma but isn't wrapped in double quotes, which splits it into two, and for a missing header row naming the columns. Fix those rows in a spreadsheet first.

Go deeper

Sources