Data handling tips

Phone numbers in CSVs

Cells and columns in CSV don't have well-defined types so programs reading those CSVs generally infer the type from the values.

This can be a problem when opening a file with phone numbers which often start with a zero, and look like a number to programs reading CSVs.

When reading a CSV file, see if you can specify that such columns should be read as Text rather than letting the program infer the type.

Example reading a CSV with the first phone number changed to text but the second will still be inferred from the data

After reading, if the columns were read as text, the zero-prefixes will remain. If the program read it as numbers, the zero prefix will have been lost.

To check that the file was saved correctly, you can open it in a text editor like Notepad to check that the zeros are still there:

Small part of a CSV shown in a text editor with phone number cells highlighted, correctly maintaining their zero prefixes.

Last updated

Was this helpful?