Pricecheck Automate this

How to compare two CSV price list files

A CSV is plain text, which is good news: nothing is hidden. The trouble starts when a spreadsheet opens it and guesses. Here is what to check in the file, how to import it without damage, and how to compare two of them.

1. Read the raw file first

Open the CSV in a plain text editor (Notepad, TextEdit in plain text mode) before any spreadsheet touches it. Four things to note:

  • Delimiter. Comma, semicolon or tab. Files exported where the comma is the decimal mark usually use semicolons.
  • Decimal mark. 1,95 and 1.95 are the same price; 1.240,00 is one thousand two hundred forty.
  • Quoting. A description containing the delimiter must be in double quotes, and a quote inside it is doubled ("").
  • Encoding. If accented characters show as two odd symbols, the file is UTF-8 being read as something else. Pick UTF-8 in the import dialog.

2. Import with explicit settings

Excel: Data, From Text/CSV. Choose the file origin (65001: Unicode UTF-8) and the delimiter, then Transform Data. Set the SKU column to Text. For decimal-comma prices, right-click the price column, Change Type, Using Locale, and pick Decimal Number with a locale that uses the comma. Close and Load.

Google Sheets: File, Import, Upload, set the separator type, and untick "Convert text to numbers, dates, and formulas" so SKUs keep their zeros. Then convert the price column on its own.

3. Check that every price is a number

A price that came in as text compares as text and silently fails every calculation. With prices in column C and a header row:

=COUNTA(C:C)-1-COUNT(C:C)

Anything other than 0 is the number of prices still stored as text.

4. Compare

With both files imported cleanly, follow the Excel method or the Google Sheets method. Or skip the import entirely: the free price list compare tool reads CSV directly, detects the delimiter, keeps SKUs as text and reads both decimal styles.

Worked example: a semicolon file with decimal commas

The raw file:

Item code;Description;Unit price
00731;"Hinge, steel 3in";4,85
00732;"Hinge, brass 3in";7,20
10044;Shelf bracket 8in;1,95
20410;"Drawer slide, 18in (pair)";12,5
90001;Fastener assortment (case);1.240,00

Read the way the free tool reads it: the delimiter is detected as semicolon, "Item code" is taken as the SKU and "Unit price" as the price.

SKU as textDescriptionPrice as writtenPrice as a number
00731Hinge, steel 3in4,85$4.85
00732Hinge, brass 3in7,20$7.20
10044Shelf bracket 8in1,95$1.95
20410Drawer slide, 18in (pair)12,5$12.50
90001Fastener assortment (case)1.240,00$1,240.00

Note the quoted descriptions keep their commas, the SKUs keep their leading zeros, 12,5 is read as 12.50 and 1.240,00 as 1,240.00. A default double-click open in a comma locale would have got several of these wrong.

Get this done for you every time a supplier sends a new list.

Pricecheck takes the supplier's email as it arrives, PDF included, compares it with the last version and sends back only the lines that moved. $49/mo, first month free for early signups. No payment now.