A CSV from a European system may write 12,50 for twelve and a half, and an English-locale import will read it as two values or as text. Importing with the right locale tells Excel that the comma is a decimal separator, so the values land as numbers that add up.
Prerequisites
- Excel
- The CSV file and knowledge of the source locale
- A copy of the source file, so the original stays untouched.
Steps
- Do not double-click the CSV. In Excel, go to Data, Get Data, From File, From Text/CSV.
- In the preview, open the locale setting and pick the locale that matches the source, such as German (Germany) for comma decimals.
- Check that the amount column shows numbers with decimal points and right-aligns.
- Load the data, then add a SUM below the amount column and compare it with a hand total.
- If any value still shows as text, fix it in the source file and re-import rather than editing the number.
Worked example: Fictional European price list imported
The practice table below is a fictional five-item price list after a locale-aware import. Each amount is a price, and the total is their sum. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.
| Item | Amount |
|---|---|
| Pencil | 0.85 |
| Sharpener | 1.10 |
| Glue stick | 2.40 |
| Scissors | 3.75 |
| Highlighter | 1.95 |
| Total | 10.05 |
Expected result. Five prices imported as numbers, and the amounts add to 10.05.
Limits
- Using the wrong locale will swap the decimal and thousands separators, so confirm the locale from the source.
- A file that mixes comma decimals and comma delimiters needs a different delimiter, such as a semicolon, to import cleanly.
