1 min read

Data Migration and Import: Using field delimiter characters in the source files

To run data import and data migration, you have to prepare a source file that contains the data you want to import. The data source files must be formatted as comma-separated values (CSV) files. The field values in the source file can be separated by commas, tabs, or other characters that are defined in the importfile.fielddelimitercode property.

Each source file must contain data of one entity type, such as accounts, leads, or competitors.

The first row in the source file should contain column headings. If you do not include the headings, use the importfile.isfirstrowheader property to specify that the first row represents actual data. In this case, default column headings are created with the names Col1, Col2, and so on.


Do not use any non-printable characters, such as newline (\n) or return (\r) characters, as delimiters for the field values. If you use a non-printable character, you will get a run-time error, such as the following DataColumnsNumberMismatch error:

      <ErrorMessage>The number of fields differs from the number of column headings.</ErrorMessage>

The rows of data that contain non-printable field delimiter characters are not imported.

For a complete list of error codes, see Error Codes.

However, if you want to use non-printable characters as field delimiters in your source data files, you have to install a hotfix.

For more information regarding the hotfix, please refer to the following Knowledge Base article: https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;948987.

For more information about how to create and prepare CSV source files for import and data migration, see the Microsoft Dynamics CRM online Help.

Inna Agranov