I have a contacts.csv file with 4330 records. On importing, CiviCRM reports that the file has 1866 records. Separating the file into three files yields proportionately similar results. Why the miscount?

1 Answer 1


This is very difficult to answer without sample data. Your data may contain carriage returns, or not escape quotation marks properly. However, if you can't safely share the data, here are some troubleshooting steps:

  • Try uploading to a demo server (demo.civicrm.org) to ensure you're seeing the same problem.
  • Most likely, some lines work and some don't. Take just the first three lines. Which import, which don't? Is there any change from adding/removing lines? What do the lines that don't import have in common?
  • Most importantly - view the data in a regular text editor, not just a spreadsheet app. The spreadsheet app may be hiding some irregularity that's obvious when viewing the data in a text editor.
  • Shouldn't each record be a separate line? When I changed the file extension from "csv" to "txt" and opened it with notepad, it appeared to be a continuous block of text without apparent separate lines. Invisible encoding? csv files were exported as text from MS Access. Edit: Sorry, my mistake. I hit word wrap and the ends of lines became observable.
    – JohnHj
    Feb 28, 2016 at 17:25
  • Yes, each record should be a separate line. I should have been clearer - there may be carriage returns in the data itself. For instance, if you're importing a "Notes" field, someone may have put a carriage return in the notes. Also - notepad does some naughty things that hides the true nature of your data. I recommend installing Notepad++ to view your data as a text file! Feb 29, 2016 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.