Importing CSV shows the error "data contains Y columns, expected Z"Issue When importing CSV files into ServiceNow, the import process may fail with an error indicating a column count mismatch: "data contains Y columns, expected Z" (for example, "data contains 1 columns, expected 4"). This error occurs when the CSV file format doesn't match the import set configuration. This article explains the causes and provides comprehensive troubleshooting steps. Symptoms CSV import fails with column count mismatch errorError message shows: "data contains X columns, expected Y"Import set shows data preview with incorrect column countCSV file opens correctly in Excel but fails in ServiceNowImport works on some rows but fails on othersData preview in import set shows all data in a single columnSome delimiters not recognized as column separators Release All Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } The issue is with the Headers in the CSV file and the character encoding.The Character Encoding of the file is UTF-16 with BOM (byte order marking).If you add the properties in the data source as charset=utf-16 it will be successfully loaded but it will load with some extra columns with the special characters.When I open the file in the MAC viewer, I can see that the CSV first line starts with "ÿþ". The ÿþ character is known as the byte order marking (BOM) character and is commonly found as the first line of a CSV file. ÿþ can not be seen when the CSV is opened with Notepad or Excel for that an Editor is required that can display the BOM (Byte Order Mark).If you would like to continue, this will create a column name with a special character like below when you load with the property charset=utf-16. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } - Review how the CSV file is getting created and why it started prepending the BOM character ÿþ to the beginning of the file. - Save the file with the encoding utf-8 or utf-16 and import the file for the expected results - Once the data source CSV file no longer includes a BOM character then you will see the expected results.