All guides

Import CSV into Excel: UTF-8, delimiters and quotes

Import CSV into Excel without losing data: confirm UTF-8, declare the delimiter and quote rules, load codes as text, then check field and record counts.

Method7 min read
A practical guide to reviewing your catalogues.
View sources
In this guide 9 sections

To import a CSV into Excel without damaging it, import the file as data instead of opening it directly, and declare the encoding, the delimiter and the quote rules yourself, with every column loaded as text. Then check the number of fields per record and the number of records before converting any price, date or quantity.

A file that opens without an error can still be wrong: one description split across two columns shifts every value after it, and a product code read as a number loses its leading zeros for good. This guide uses a supplier price list as the example; the method is the same for any CSV.

How do you import a CSV into Excel without breaking the data?

Work through five steps, in this order:

  1. Keep the original. Save the supplier’s file unchanged and work on a copy. Never save a damaged import over the source.
  2. Read the copy as plain text in any text editor. Note the character between fields, how descriptions are quoted and whether accented letters display correctly.
  3. Confirm the export settings with the sender: encoding, delimiter, quote character, expected column count and record count. The .csv extension establishes none of these.
  4. Import with explicit settings. Opening a CSV directly lets the spreadsheet guess every column type, which is when leading zeros, long codes and date-like values change. Import it as data instead, set the encoding, delimiter and quote handling to the agreed values, and set every column to text.
  5. Check the result against the source, then convert columns one by one.

Product codes stay as text throughout: the rules for keeping them stable are in normalise product codes without losing leading zeros. GTINs too: after the import, verifying the GTIN-13 check digit flags a 13-digit code that was rounded or shortened. Once both the old and the new price list import cleanly with the same settings, you can compare two supplier price lists with a full outer join, which keeps unmatched codes from both sides.

Diagnose the symptom first

Most broken imports have one of a few causes. Find it on the untouched copy before changing settings.

Symptom after importFirst check
Each whole record sits in one columnDelimiter: the file uses another character than the one applied
A description creates an extra columnDelimiter inside a field that is not correctly quoted
A description creates an extra rowLine break inside a field: quoted, and kept within the field?
Accented letters show as unexpected charactersEncoding confirmed by the exporter
Product codes lost their leading zerosCode column typed as a number
Some values became datesAutomatic type detection applied to text values

Do not repair a file by replacing every comma or semicolon: those characters can belong to descriptions or to decimal prices such as 12,50.

Which encoding does the CSV use?

The file itself does not say. RFC 4180 describes US-ASCII as the common case and lets other character sets be declared outside the file, and the W3C tabular data model uses UTF-8 as its default. For a supplier export with accented descriptions, agree on UTF-8 and import with UTF-8 declared.

Some UTF-8 files begin with a byte order mark, the bytes EF BB BF. According to the Unicode FAQ, in UTF-8 it serves only as a signature that the file is UTF-8; it is optional, and some receiving systems do not expect it. If the first header reads with stray characters before reference, the mark has been read as text.

If accents are already garbled in your copy, go back to the original file and import it again with the right encoding. Correcting characters cell by cell in a damaged copy rarely restores every value.

Comma or semicolon: which delimiter?

RFC 4180 defines CSV with commas. Many European exports use semicolons instead, because the comma is the decimal separator in prices. The W3C metadata vocabulary for tabular data treats the delimiter, the quote character, the encoding and the header row as dialect settings of the file, with a comma, a double quote and UTF-8 as defaults. Record the dialect you agree with the sender:

SettingValue for this synthetic export
EncodingUTF-8
DelimiterSemicolon (;)
Quote characterDouble quote ("), doubled inside a field
Header row1
Line breaks inside quotesKept within the field
Expected fields per record3
Column types at importText for every column

Converting 12,50 into a number is a separate step, made after the structure is checked: see convert prices that use a decimal comma.

How do quotes and line breaks inside fields work?

Under RFC 4180, a field that contains the delimiter, a double quote or a line break should be enclosed in double quotes, and a double quote inside such a field is written twice. So "Series ""Pro""" holds the value Series "Pro".

A quoted field can therefore run over several physical lines. The import must treat the quote as the start of a field and keep the line break inside the cell; otherwise one record becomes two rows and every later column shifts. If the line break is not quoted in the file, the export is malformed: ask the sender for a corrected file rather than patching rows by hand.

Test the import with a difficult record

Synthetic example:

reference;description;price
A-17;"Équerre; series ""Pro""";12,50
00127;"Bracket
Model L";9,00

The file has four physical lines but three records: the header and two product records. Expect three columns. A-17 has the description Équerre; series "Pro", with the semicolon kept inside the value. The second description keeps its line break within one cell. The code 00127 stays five text characters. 12,50 and 9,00 stay text until price conversion.

Then test two altered copies, one with a surplus fourth field and one with the price field missing. Both must be reported for review, not padded or dropped silently. An explicitly empty field (A-18;Hinge;) is a different source state from a missing field, so keep the two apart in your checks.

Check the import before converting prices

  • Record count: compare the parsed records with the count the exporter gives, not with the number of text lines.
  • Fields per record: every record has the agreed number of fields; list the exceptions with their line numbers.
  • First and last records: check the identifiers, the longest descriptions and the final column. A preview can hide a malformed record near the end.
  • Characters: search for replacement characters and a stray signature in the first header.
  • Formula-like values: a cell that starts with =, +, - or @ can be read as a formula; see prevent CSV formula injection in catalogue exports.

Keep rejected records and the reason for each instead of deleting them to make the import succeed. Apply the same settings to both editions of the price list, and note any documented exception.

Limits of a CSV for catalogue data

A CSV holds a single table. A FAB-DIS 3.0 file is organised in blocks, such as B01 COMMERCE, B02 LOGISTIQUE and B03 MEDIA, so a CSV export of one block does not carry the others or the file’s structure. Keep the manufacturer’s original file as the reference edition, and treat any CSV as a working extract. To see what a comparison of two complete editions shows, look at the sample difference report.

Frequently asked questions

Why does my CSV open in one column in Excel?

The file uses a different delimiter from the one applied during the import. Supplier price lists often use a semicolon because the comma is the decimal separator, so import again with the delimiter confirmed by the sender.

How do I keep leading zeros when importing a CSV?

Import the product code column as text before any conversion. Once a code has been stored as a number, the zeros are gone and cannot be recovered from the cell, only from the original file.

How do I fix accented characters after a CSV import?

Import the original file again with the encoding confirmed by the exporter, usually UTF-8. Repairing characters cell by cell in a damaged copy is unreliable.

Why does one description split into two rows?

The description contains a line break. It must be enclosed in double quotes in the file, and the import must keep line breaks inside quoted fields; if the field is not quoted, the export itself needs correcting.

Does the .csv extension tell you the encoding or delimiter?

No. The extension only suggests comma-separated values, so confirm the encoding, delimiter and quote character with whoever produced the file.

Official sources & scope

This guide describes a working method. The examples are fictional; the official documentation remains the reference for the format rules. CatalogInspect is an independent service.

Back to guides & resources

Request access to CatalogInspect.

Enter your work email address to request access to CatalogInspect.

Submitting sends your request to BankStatementLab’s infrastructure for CatalogInspect. It does not create an account, trigger a payment or send an automatic email. Privacy.