-
-
Notifications
You must be signed in to change notification settings - Fork 368
Closed
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.csvThe csv file format, csv output format, or generally CSV-related.The csv file format, csv output format, or generally CSV-related.
Description
I am importing some CSV from Amex and noticed that their csv amount field is double-quoted and includes a space in front of the value. So, for example: " -140.00".
I noticed that this causes an error when trying to invert the amount in the csv rules file. So if I add the line: amount -%amount GBP it then throws and error on import.
In full, the output is:
the CSV record is: "14/04/2019", "Reference: XXX", " 6.99", "PAYPAL *ELIDA76 LTD 4029357733", " Process Date 14/04/2019", ""
the amount rule is: -%amount GBP
the currency rule is: unspecified
the default-currency is: unspecified
the parse error is: 1:2:
|
1 | - 6.99 GBP
| ^
unexpected space
expecting amount
Deleting the space in the input csv file removes the error.
Is there a way to force hledger to trim incoming values?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.csvThe csv file format, csv output format, or generally CSV-related.The csv file format, csv output format, or generally CSV-related.