bank-csv-to-ynab

An app to convert bank CSV export files to CSV files in YNAB format.

Usage no npm install needed!

<script type="module">
  import bankCsvToYnab from 'https://cdn.skypack.dev/bank-csv-to-ynab';
</script>

README

bank-csv-to-ynab

This is a simple tool to convert CSV files from banking transactions to the correct format to be imported into YNAB.

Notes

Currently only DKB CSVs are supported.

Usage

API

For usage see tests. Here is an example:

const dkbCSVToYNABCSV = require('bank-csv-to-ynab')
let DKBFileASString // This is the input string. Possibly read from file.

dkbCSVToYNABCSV(DKBFileAsString).then((ynabCSVString) =>
  console.log(ynabCSVString)
)

CLI

Lets say you have an input dbk.csv with the following content:

"Kontonummer:";"DE04120300002020202020 / Girokonto"
"Von:";"04.09.2018"
"Bis:";"04.10.2018"
"Kontostand vom 04.10.2018:";"42,42 EUR"

"Buchungstag";"Wertstellung";"Buchungstext";"Auftraggeber / Beg�nstigter";"Verwendungszweck";"Kontonummer";"BLZ";"Betrag (EUR)";"Glaeubiger-ID";"Mandatsreferenz";"Kundenreferenz"
"02.10.2018";"02.10.2018";"Dauerauftrag";"Hans Foo";"Semestergebuehren";"DE48733500000600600600";"BYLADEMAAAA";-50;;;"NOTPROVIDED"
"03.10.2018";"03.10.2018";"Auftrag";"Foo Hans";"Semestergebuehren";"DE48733500000600600600";"BYLADEMAAAA";10;;;"NOTPROVIDED"

You can then use the script like so:

$ npx -q bank-csv-to-ynab dkb_sample_line_DKB.csv
"Date","Payee","Memo","Outflow","Inflow"
"10/02/2018","Hans Foo","Semestergebuehren","50",""
"10/03/2018","Foo Hans","Semestergebuehren","","10"