quentinsf / icsv2ledger

Interactive importing of CSV files to Ledger
196 stars 70 forks source link

Support for more number formats by removing non-number characters #64

Closed hfs closed 10 years ago

hfs commented 10 years ago

The CSV files from my (German) bank contain commas as decimal separator, dots "." as thousands separator and plus signs "+" for positive amounts. E.g.:

+160,00
-1.000,00

The plus signs and the thousands separators are not handled by ledger and should be removed from the output.

Instead of trying to support more number formats, I propose to simply strip off any offending characters which are not digits 0-9, minus "-" or the decimal separator "." or ",".

petdr commented 10 years ago

Looks good, thanks.