GitHub
Imports

Imports

The Imports screen turns a statement you downloaded into transactions in your journal. It uses hledger’s own hledger import and your existing *.rules files, so an import done here gives the same result as one run from a terminal.

Imports has three tabs. Press 1–3 to switch between them. A plain link to Imports opens New Transactions.

Account aliases used to be a third tab here. They now live under Settings → Account Aliases, and Ledgeline forwards an old bookmark to the Imports tab there.

What you need first

Imports runs hledger, so Ledgeline needs hledger 1.40 or newer. If it can’t find one, or finds one that is too old, the New Transactions tab shows a banner where you can type the path to the binary. The rest of the tab stays hidden until hledger works.

Ledgeline also needs a journal file it can write to. If it was started without one, New Transactions explains that there is nowhere for an import to go, and Edit Rules still works read-only.

Supported formats

Ledgeline converts whatever you drop into one CSV, then hands that CSV to hledger with the rules file you choose.

FormatExtensionsNotes
Delimited text.csv, .tsv, .ssvLedgeline guesses the delimiter and the text encoding and tells you when it guessed.
OFX family.ofx, .qfx, .qboEach transaction’s FITID becomes a fitid column, which makes re-downloads safe. See re-downloads.
Spreadsheets.xls, .xlsx, .xlsm, .xlsb, .odsLedgeline reads one sheet and says which.
QuickBooks Online Journal report.xlsxDetected from the file’s contents and handled by its own panel. See Importing from QuickBooks.
QIF and QMTF.qif, .qmtfA whole set of books from Banktivity, Quicken, Moneydance or GnuCash, handled by the same panel as QuickBooks. See Importing a QIF file.
Xero, GnuCash, hledger CSV, YNAB, Monarch, Copilot.csvRecognised from the column headings and handled by the same panel as QuickBooks. Ordinary bank CSVs still go to the rules screen. See Importing from other apps.

Ledgeline refuses PDF statements. The numbers in a PDF aren’t reliably where they appear to be, so Ledgeline asks you to download CSV, OFX/QFX or a spreadsheet from your bank instead. The research behind that decision is in PDF extraction.

What Ledgeline will not do

There is no raw text editor for rules files or journals. The Edit Rules tab covers the settings, the column mapping, the two default accounts and an ordered list of if rules. The tab shows anything it can’t model safely as read-only and saves it byte for byte. For everything else, open the file in your editor.

Ledgeline also never runs a rules file’s source ... | COMMAND line, because that would let a file run arbitrary programs. Security in the developer notes explains the full set of guards.

Pages in this section

How the import pipeline works internally, and why, is in Imports internals.