TROUBLESHOOT

Fixing corrupted CSV file: Checklist

CSV Troubleshoot
Corrupted csv files are commonly understood to be files with data that appears incorrectly in your spreadsheet or another program into which you imported your data.

The most common data corruption problems you might encounter:

  • wrongly formatted numbers (some values turned into dates and vice versa)
  • leading zeros have been erased
  • numbers appearing as scientific notation
  • missing or madly translated special characters

When you see all this, you know something has gone wrong. There are thousands upon thousands of reasons why files can become corrupted, so it's much wiser to start looking for a solution to the problem than to try to figure out why it happened in the first place.

However, before you proceed, open your CSV file in a text editor (e.g. Notepad or TextEdit). Does your data still appear to be corrupt? If not, you know the issue is with the way you import data into your spreadsheet.

Here's a checklist to troubleshoot your data issues. The majority of them can be resolved using import tools or spreadsheet wizards (Excel in particular needs you to use one).

  1. Check if your file has UTF-8 encoding? (Here's how to do it)
  2. Does your data contain columns with numbers greater than 15 digits?
  3. Does your data contain columns with leading zeros?
  4. Do you see dates where they shouldn't be?
  5. Does your file have delimiters in the text (such as commas in the text itself)? Make sure they are enclosed in quotation marks.
  6. Check the file for extra spaces between delimiters, at the end of lines, etc.
  7. Check for extra columns or blank lines.