csvfmt
Interactive CLI tool to convert CSV files between locale formats (EN/DE).
German Excel exports use ; as delimiter and , as decimal separator, while English exports use , and .. This tool auto-detects the source format and lets you interactively confirm and convert.
Install
go install github.com/fxsml/csvfmt@latest
Or build from source:
go build -o csvfmt .
Usage
csvfmt <input.csv> <output.csv>
The tool will:
- Auto-detect delimiter and decimal separator
- Walk you through confirming source format, choosing target format, and selecting which columns contain numbers
- Preview the converted output
- Write the result
Example
# German to English
csvfmt data_de.csv data_en.csv
# English to German
csvfmt data_en.csv data_de.csv
| Locale |
Delimiter |
Decimal |
Example |
| EN |
, |
. |
1,234.56 |
| DE |
; |
, |
1.234,56 |
| Tab |
\t |
either |
1234.56 |