A Spanish CSV: semicolons, decimal commas, and identifiers that lose their zeros
A Spanish export separates fields with semicolons and writes 1.234,56 for one thousand two hundred and thirty-four and a half. The conversion is routine; what is not routine is what happens to the reference numbers on the way, because a spreadsheet treats anything that looks like a number as one.
What a Spanish file usually looks like
Saved by a spreadsheet set to Spanish (Spain), the file has a semicolon between the fields, a comma as the decimal mark and a full stop between thousands, so one thousand two hundred and thirty-four and a half is written 1.234,56. Dates are written DD/MM/YYYY: the last day of 2026 is 31/12/2026.
The separator is not a character any of the numbers contain, so nothing in the file needs quoting to survive — which is exactly why the amounts and the fields can be told apart at all.
None of this is a rule the file carries with it — there is no country written inside a CSV. It is what the program that wrote the file was set to, which is why every tool here reads the bytes and says what it found rather than trusting a flag.
The identifiers are the part to watch
A Spanish file typically carries references the rest of the row hangs on — an invoice number, a customer code, a tax identifier. Many of them start with a zero, and a spreadsheet opening the file reads them as numbers and throws the zero away: 00412 becomes 412, and the two no longer match anything. Nothing warns you, and once the file is saved again the zero is gone for good.
The sample on this page carries references of exactly that shape — 00412 and its neighbours — so you can see them survive here and watch a spreadsheet eat them. That is a different failure from the separator problem, and it survives fixing the separator. A converted file opened in the same spreadsheet loses the same zeros. The way out is to stop opening the file in a spreadsheet at all for the steps that do not need one: the tools here read the file as text and write it back as text, so a reference that arrived as 00412 leaves as 00412.
When the file does need to reach a spreadsheet, the CSV to Excel converter here writes every value as a text cell, so the workbook opens with the zeros still on. The Excel checker will also tell you in advance which values a spreadsheet would change, identifier by identifier, before you find out the hard way.
And the ordinary conversion
The separator and the numbers are the standard European pair. The delimiter fixer reads the semicolons, decodes the file by what the bytes actually are — a Windows-1252 export is still common and is why an accented name can arrive looking wrong — and converts a column of amounts when nearly every value in it reads as a number, reporting the count before you download.
Dates are written 31/12/2026, day first. Below the thirteenth of the month they are indistinguishable from the American order by eye, so read them with the pattern %d/%m/%Y rather than letting a tool guess; the console does it in one expression and the result is real dates you can group by month.
The sample file
Factura;Cliente;Fecha;Importe
00412;Ejemplo SL;31/12/2026;1.234,56
00413;Muestra SA;02/03/2026;89,50
00414;Modelo SL;05/06/2026;32,10
00415;Prueba SL;12/11/2026;24.680,00
00416;Demostracion SA;20/01/2026;410,00
Obviously made-up data, small enough to read. Download it and drop it on the tool to see the fix before trying your own file.
Questions
- Why is my Spanish CSV separated by semicolons?
- Because Spanish regional settings use the comma as the decimal mark, so the list separator between values is a semicolon instead. The file is right for Spain and unreadable to a tool told to expect commas.
- Why did 00412 turn into 412?
- A spreadsheet read the reference as a number, and a number has no leading zeros. It happens on opening, before you have changed anything, and saving afterwards makes it permanent.
- How do I keep the leading zeros?
- Do the work on the file as text rather than opening it in a spreadsheet, which is what the tools here do. If it must become a workbook, convert it here so every value is written as a text cell.
- Can I see which values a spreadsheet would change first?
- Yes. The Excel checker lists them by kind — the identifiers that would lose zeros, the values that would become dates, the long numbers that would be rounded — before you open anything.
- What does 1.234,56 become?
- It becomes 1234.56, the same amount in the notation most databases expect, and the number of values changed is shown before you download the converted file.
- Does my Spanish file get uploaded to check it?
- No. Every step here — the check, the conversion, the download — happens inside the page on your machine; the browser is told to refuse outbound connections.