mirror of https://github.com/Gnucash/gnucash
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
495 lines
22 KiB
495 lines
22 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>Importing Quicken Data Into GnuCash</title>
|
|
<meta name="description" content=
|
|
"Importing Quicken data into GnuCash isn't the simplest thing in the world, but if you pay attention and have some patience you can get a very close approximation of what you want.">
|
|
<meta name="keywords" content=
|
|
"QIF, Quicken, importing">
|
|
</head>
|
|
|
|
<body bgcolor="#eeeeee">
|
|
<h1>Importing Quicken data into GnuCash</h1>
|
|
<h3>Bill Gribble <grib@billgribble.com></h3>
|
|
|
|
<a name="toc"><h2>Table of Contents</h2></a>
|
|
<ul>
|
|
<li> <a href="#overview">Overview
|
|
<li> <a href="#intro">Introduction to the QIF file</a>
|
|
<li> <a href="#how-to">How to use the Import QIF dialog</a>
|
|
<li> <a href="#dialog-files">The "Files" tab</a>
|
|
<li> <a href="#dialog-accounts">The "Accounts" and "Categories" tabs</a>
|
|
<li> <a href="#dialog-picker">The Account Picker dialog</a>
|
|
<li> <a href="#ok-button">The "OK" button
|
|
<li> <a href="#hints">Hints</a>
|
|
<ul><li> <a href="#opening-balance">Opening balances</a>
|
|
<li> <a href="#empty-category">Empty category</a>
|
|
<li> <a href="#dividend-category">Dividend category</a>
|
|
<li> <a href="#fund-families">Fund families</a>
|
|
<li> <a href="#brokerage-accounts">Brokerage accounts</a>
|
|
</ul>
|
|
</ul>
|
|
|
|
|
|
<a name="overview"><h2>Overview</h2></a>
|
|
|
|
<p>Quicken is one of the best-selling programs in the history of
|
|
the Universe. Pretty much everyone that has owned a PC or Mac since
|
|
the late 80's has had a copy of it lying around somewhere, and lots of
|
|
people actually use it to keep track of their finances. Why? Because
|
|
it works pretty well and Intuit has (to their credit) done a good job
|
|
of keeping up with what people want the program to do.
|
|
|
|
<p>They've done such a good job, in fact, that lots of Linux folks
|
|
keep a Windows partition on their machine just so they can run Quicken
|
|
and the latest shoot-em-up games. So of course we want to give you a
|
|
way to suck all your Quicken data into GnuCash and remove one more
|
|
barrier to putting a nice <tt> ext2 </tt> filesystem on that Windows
|
|
partition.
|
|
|
|
<p>The problem is that GnuCash is a real double-entry accounting
|
|
system and Quicken has a pretty simplistic view about what an account
|
|
is, what a transaction is, and, most critically, is severely flawed in its datamodel, that is, <em> what it saves in
|
|
data files.</em>
|
|
|
|
<P> Briefly, QIF files just don't contain enough information to
|
|
completely and accurately reconstruct your Quicken account hierarchy
|
|
in the GnuCash double entry system without some educated guessing by
|
|
the import code as well as some guidance, provided by you.
|
|
<ul>
|
|
|
|
<li> QIF files omit small things that may be fairly accurately inferred by
|
|
examining the data.
|
|
|
|
<P> For instance, are numbers in decimal-radix [1,000.00 ==
|
|
1000] form or European comma-radix form [1.000,00 == 1000]?
|
|
<P> Or are
|
|
dates <tt> m/d/y </tt> or <tt> y/m/d</tt>?
|
|
|
|
<Ll> More problematic are major things where there is little way of
|
|
guessing.
|
|
|
|
<P> For instance, determining the currency the file is denominated in.
|
|
|
|
<P> Or what <em> account </em> the file describes.
|
|
|
|
<p> GnuCash's QIF importer does a remarkably good job of guessing what
|
|
it can, but you <em> do </em> have to keep an eye on it. Fortunately,
|
|
the system is designed so that you can correct problems <em> before
|
|
</em> you changes are dropped into your GnuCash accounts. Nothing is
|
|
done to your GnuCash accounts until you click the final "OK" button.
|
|
|
|
<p>In the next section, I'll give an overview of the QIF file and
|
|
its "features". This may seem unnecessarily technical, but if you at
|
|
least glance through it you will be much better able to understand
|
|
what's going on if you are having to jump through hoops to make make a
|
|
problematic file work right, and how you might be able to jump right
|
|
in and edit the QIF file to fix really tough problems.
|
|
|
|
<p>There are two major "paths" for using the GnuCash QIF importer.
|
|
<ul>
|
|
|
|
<li> One is the "I am a Quicken user just migrating to GnuCash" path.
|
|
|
|
<li> The other is the "I am downloading some updates from my bank as a
|
|
QIF file" path.
|
|
|
|
</uL>
|
|
|
|
<P> This document mainly focuses on the former case, since new users
|
|
are likely to need the most help and you really can't get started
|
|
using GnuCash until you can get your old records in. Fortunately,
|
|
once you learn to do the former, the latter should be a piece of cake.
|
|
|
|
<p><a href="#toc">Table of Contents</a>
|
|
|
|
<a name="intro"><h2>Introduction to the QIF file</h2></a>
|
|
|
|
<p>QIF files are plain text files formatted as "tag-value" pairs.
|
|
At the beginning of each line there is a single character "tag"
|
|
followed immediately by the "value", which extends to the end of the
|
|
line.
|
|
<P> Don't be afraid to pop up a QIF file using <tt> less </tt>
|
|
or the text editor of your choice if you are having problems getting
|
|
some Quicken data imported correctly; chances are a simple
|
|
search-and-replace can fix just about any problem you might have with
|
|
a QIF file. And a regexp search-and-replace will get the rest.
|
|
|
|
<p>Collections of tag-value pairs form records of various types.
|
|
There are records to store the names and descriptions of your accounts
|
|
and of expense and income categories that you have defined in Quicken.
|
|
There are records to define Quicken "classes" (sort of like
|
|
sub-accounts, sort of like categories, but not exactly like either).
|
|
And there are records to describe transactions.
|
|
|
|
<p>Here's a typical Quicken transaction record:
|
|
<pre>
|
|
!Type:Bank
|
|
D6/20/97
|
|
T-500
|
|
N1012
|
|
C*
|
|
M
|
|
P
|
|
L[Visa]
|
|
^
|
|
</pre>
|
|
|
|
<p>The ! tag denotes the start of a section of records of a
|
|
certain type. In this case, Bank transactions. Type:Cat means
|
|
a section of Category descriptions, Account means account
|
|
descriptions, and so on.
|
|
|
|
<p>The D tag denotes the date. Note y2k compliance "issue".
|
|
Here's a lovely "feature" of some version of Quicken and dates in
|
|
2000:
|
|
<pre>
|
|
D1/ 1' 0
|
|
T-640.00
|
|
CX
|
|
N511
|
|
PJoe Bob
|
|
LRent:Apartment
|
|
^
|
|
</pre>
|
|
|
|
<p>Ouch! Fortunately the GnuCash QIF importer can handle all of
|
|
the wacky date formats that the gnucash-devel list can find.
|
|
|
|
<p>The T field is the "Total" amount of the transaction. If there
|
|
are splits, the sum of all the split amounts is in a T field. Money
|
|
going out of the account is negative.
|
|
|
|
<p>The N field is a "Number", which is usually a check number or
|
|
some other identifying number for the transaction.
|
|
|
|
<p>The C field represents the clearing/reconciliation state of the
|
|
transaction. An x or X in this field means the transaction is
|
|
"Cleared", a * means the transaction is Reconciled.
|
|
|
|
<p>The M field is the transaction memo.
|
|
|
|
<p>The P field is the Payee.
|
|
|
|
<p>The L field is the Category/Account line. If the value in this
|
|
field is enclosed in square brackets, like [Visa], this transaction is
|
|
a transfer to the Quicken account named Visa. If there are no square
|
|
brackets, the transaction is in the named Category (like
|
|
Rent:Apartment).
|
|
|
|
<p>The ^ tag means End of Record.
|
|
|
|
<p>Quicken users taking advantage of Classes will see a slash (/)
|
|
character followed by the class name appended on the Category line
|
|
(like [Visa]/Project)
|
|
|
|
<p>If a transaction has "splits", meaning that it is a single
|
|
transaction with "this" account but is "split" into multiple
|
|
source/destination accounts, the splits are described with S fields
|
|
for the category/account/class of each split, an $ field for the
|
|
amount of the split, and an E field for a per-split memo. The total
|
|
of all the $ fields in a transaction record should equal the T field.
|
|
|
|
<p>Note that nowhere in the transaction record, nor anywhere
|
|
else in the file, does Quicken store the name of the account that the
|
|
file describes. Don't ask me why not, I don't know either. Microsoft
|
|
Money (which also can save QIF files) uses a "trick" to get the
|
|
information in the file. If the very first Bank transaction in the
|
|
file has a payee of "Opening Balance", the L line contains the name of
|
|
the account that the file describes:
|
|
|
|
<pre>
|
|
!Type:Bank
|
|
D12/03/95
|
|
T4,706.57
|
|
CX
|
|
POpening Balance
|
|
L[New Bank]
|
|
^
|
|
</pre>
|
|
|
|
<p>Opening Balance records are handled specially, since they don't
|
|
mean what the data appear to indicate (if you interpret the record
|
|
literally, as a transfer of $4706.57 from [New Bank] to [New Bank],
|
|
your new balance is a whopping $0.00). In the <a
|
|
href="#dialog-accounts">Accounts Tab</a> section there's a discussion
|
|
of what we do with them.
|
|
|
|
<h3>Multi-account Quicken exports</h3>
|
|
|
|
<p>Quicken and some other programs who use QIF as an export format
|
|
know how to put the history of multiple accounts into a single QIF
|
|
file. They do this by prepending an "!Account" record before the set
|
|
of transactions to/from that account.
|
|
|
|
<p>The QIF Importer should be able to handle these files fine. You
|
|
may notice that the "Default QIF Account" seems somewhat arbitrary;
|
|
for multiple-account exports, the guessed account is the first one
|
|
with an Opening Balance record. However, since Quicken explicitly
|
|
lists the account for every transaction in multi-account exports, you
|
|
aren't likely to get any transactions in the default account other
|
|
than those that are supposed to be there.
|
|
|
|
<p><a href="#toc">Table of Contents</a>
|
|
|
|
<a name="how-to"><h2>How to use the QIF Import dialog</h2></a>
|
|
|
|
<p>The "Quick Start" guide: To load your files, click the "Select ..."
|
|
button in the Files tab to find the file, then click the "Load File"
|
|
button at the bottom of the Files tab to actually load it.
|
|
|
|
<P>Repeat this until all your files are loaded (read the explanation
|
|
below to see why you should load all your files at the same time).
|
|
Check the Accounts and Categories dialogs and make corrections if
|
|
necessary. Then click the big OK button.
|
|
|
|
|
|
<p>Why you need to load all your files at the same time:
|
|
|
|
<p>There are two different types of QIF files: those that describe
|
|
single accounts and those that describe multiple accounts. Both kinds
|
|
to try to be "complete" in representing all the transactions involving
|
|
each account that they represent. What this means is that if you have
|
|
multiple Quicken accounts, with transfers between them, transactions
|
|
will show up in multiple accounts. This means that if you aren't
|
|
smart about catching duplicate transactions you will end up with wrong
|
|
balances in GnuCash. Definitely a bad thing.
|
|
|
|
<p>In order to get the best possible replication of your Quicken
|
|
account tree, export everything you can from Quicken and then import
|
|
it all in one session, either as a single QIF file representing all
|
|
your accounts together or as a single file for each account. The
|
|
importer's <a href="#dialog-files">Files tab</a> will allow you to
|
|
load as many QIF files as you want, and to make sure that the
|
|
currency, Quicken account name, and so on are right for each one. The
|
|
importer can do a really good job of catching cross-references (which
|
|
and marking them.
|
|
|
|
<p>The importer is written mostly in Guile, and it can be a little
|
|
slow on large QIF files. Load File takes 5-6 seconds for a QIF file
|
|
with 1000 or so transactions on my machine.
|
|
|
|
<p>Once you have loaded all the files into the importer, go to the
|
|
<a href="#dialog-accounts">Accounts tab</a>, and then to the <a
|
|
href="#dialog-categories">Categories tab</a>, and check that the
|
|
importer is going to put your Quicken transactions in the right place.
|
|
You can click to pop up a dialog and change the GnuCash destination
|
|
account name/type for any QIF account. Don't be afraid to change
|
|
these destination accounts; they are merely guesses by the importer
|
|
based on the name and type of the QIF account. Mappings of Quicken
|
|
account to GnuCash account are written to a preferences file when you
|
|
click "OK", so if you import other Quicken files describing these same
|
|
accounts you won't have to correct the importer again.
|
|
|
|
<p>Make sure (especially in the Accounts tab) that the QIF account
|
|
names and transaction counts make sense to you. If you see that one
|
|
QIF account is mentioned by two different names, make sure that the
|
|
"QIF Account" for every file in the Files tab is what you meant it to
|
|
be. If the QIF Account for a file is wrong, the importer won't be
|
|
able to match up transfers correctly and your balances will be wrong.
|
|
If a QIF Account for a file is wrong, select the file in the Files tab,
|
|
unmark the "Auto" checkbox, and edit the text box to contain the right
|
|
name, then click "Load File" again. You will be asked to confirm a
|
|
reload of the file and then it will be done. Flip back to the
|
|
Accounts tab, see if that fixed the problem, repeat as necessary.
|
|
|
|
<p>When you are happy with the account mappings (double check
|
|
them, and make sure to save your GnuCash session first just to be
|
|
sure), then and only then click OK. If you click Cancel at any time,
|
|
your accounts will not be touched.
|
|
|
|
<p>Again, the importer is written mostly in Guile, and it can be a
|
|
little slow on large QIF files. It takes 3-4 seconds to stuff 1000
|
|
transactions into GnuCash on a Celeron 433, proportionately longer on
|
|
slower CPUs. You only have to do a large import like that a few
|
|
times, fortunately, so I'm not too worried about it.
|
|
|
|
<p><a href="#toc">Table of Contents</a>
|
|
|
|
<a name=dialog-files><h2>The "Files" Tab</h2>
|
|
|
|
<p>The first thing to do is load all your files. Click "Select
|
|
File", pick your file, then set the account, currency, radix, and date
|
|
fields, then click "Load File". The Currency field defaults to the
|
|
GnuCash default currency (set in the International tab of the
|
|
Preferences dialog). Try autodetecting radix, date format, and
|
|
account name first. The radix and date formats will stay on
|
|
"Autodetect" if the autodetector is not 100 percent sure of the right
|
|
answer; in that case, you will have to make a manual selection. You
|
|
probably know what the correct radix format is; if you're in the US or
|
|
the UK, it's definitely "decimal". Almost every QIF file I have seen
|
|
in the US is m/d/y for the date format, so try that if auto-detect
|
|
doesn't work.
|
|
|
|
<p>To go back to a file that you have previously loaded, select
|
|
its name in the file list on the left. If you change settings for a
|
|
previously-loaded file, click "Load File" again to reload it with new
|
|
settings. Don't forget to turn off "Auto" on the QIF Account entry if
|
|
you manually enter it.
|
|
|
|
<p>If there's no Opening Balance record in the file, the account
|
|
name is guessed from the file name: any .qif extension is removed, and
|
|
all dashes and underscores are changed to spaces. If you want to save
|
|
yourself manually re-entering the name, save the file with a name that
|
|
will get guessed correctly (i.e. save the account "My Bank Account" as
|
|
My-Bank-Account.qif or My_Bank_Account.qif).
|
|
|
|
<a name=dialog-accounts><h2>The "Accounts" and "Categories" Tabs</h2>
|
|
|
|
<p>Each line in the Accounts tab display represents a mapping from
|
|
a Quicken account to a GnuCash account. Similarly, the Categories tab
|
|
display shows mappings from Quicken categories to GnuCash
|
|
accounts. Only QIF accounts referenced by one or more transaction
|
|
records are displayed. The name of the GnuCash account is displayed
|
|
in "full name" format, including the names of all parent accounts
|
|
separated by your default separator character (generally ":").
|
|
|
|
<p>The first thing to check is the column of Quicken account
|
|
names. Make sure there are no duplicates with slightly-different
|
|
names. If a QIF transaction makes a transfer to [My Checking], and
|
|
you imported a file called my-checking.qif, you might have one account
|
|
entry for "my checking" and one for "My Checking". If these are the
|
|
same account, you need to go back to the Files tab and reload
|
|
my-checking.qif with the correct Quicken account name, My Checking.
|
|
|
|
<p>Once you have all the Quicken accounts making sense, check the
|
|
GnuCash account column. The default GnuCash account for a given
|
|
Quicken account is determined by a fallback procedure which makes the
|
|
best guess it can given the available information. The guesses that
|
|
are tried are (in order of preference):
|
|
|
|
<ul>
|
|
<li>Saved mappings from previous import sessions. Each time you
|
|
click "OK" in the import dialog, the mappings that you have selected
|
|
are saved for the next time you import files. At the moment, the file
|
|
is always called ~/.gnucash/qif-accounts-map. If you get some weird
|
|
default mappings (for instance, if you change an account name and the
|
|
importer wants to keep creating a new account with the old name) just
|
|
delete this file. It's on my wishlist to make this work a little
|
|
more smoothly.
|
|
|
|
<li>Similar accounts from your existing GnuCash account tree.
|
|
"Similar" means that the account types are compatible and the names
|
|
could reasonably be assumed to refer to the same thing. Full-path
|
|
exact name matches are preferred most, followed by case-insensitive
|
|
matches, followed by matches with prepended account parents (i.e.
|
|
QIF account Visa matches GnuCash account Credit Cards:Visa), followed
|
|
by various substring matches. If you think of a good heuristic
|
|
for this, let me know.
|
|
|
|
<li>New account. The name of the new account is currently just
|
|
the same as the name of the Quicken account; again, if you think of a
|
|
good heuristic to make this better let me know. I've thought about
|
|
making it look for subtrees to insert into (if all existing credit
|
|
card accounts are children of an account, make the new account a child
|
|
of that account, etc). On the wishlist.
|
|
</ul>
|
|
|
|
<p>Check both the name of the GnuCash account for each QIF account
|
|
and the type. If you are unhappy with either, click on the row in the
|
|
display containing the offensive mapping. You will see the
|
|
<a href="#dialog-picker">Account Picker</a> dialog which will allow you
|
|
to change it.
|
|
|
|
<p><a href="#toc">Table of Contents</a>
|
|
|
|
<a name=dialog-picker><h2>The Account Picker</h2>
|
|
|
|
<p>This account picker is sort of broken. The idea is that you
|
|
can select an existing account from the tree display, or enter
|
|
information for a new account in the boxes below. However, right now
|
|
it's possible to do Very Bad things like specify a subaccount of an
|
|
existing account with a type that's not compatible with the parent.
|
|
As soon as I figure out how I want this dialog to work I'll fix it. I
|
|
have tested out the worst things that you can do and nothing terrible
|
|
happens, except your account tree might be in a state that you could
|
|
never have created through the GUI (a Credit Card account as a child
|
|
of a Bank account, for example). Don't do that. I'll fix it Real
|
|
Soon.
|
|
|
|
<p><a href="#toc">Table of Contents</a>
|
|
|
|
<a name=ok-button><h2>The "OK" Button</h2></a>
|
|
|
|
<p>Everything really happens when you hit the "OK" button, so it
|
|
gets a section to itself.
|
|
<ul>
|
|
<li>First we do a "mark and sweep" to eliminate the duplicated
|
|
halves of transfers in the loaded Quicken transactions.
|
|
<li>A GnuCash account tree is created which mirrors
|
|
your existing tree and includes any new accounts added by your
|
|
Accounts and Categories mappings.
|
|
<li>All the QIF transactions are converted into GnuCash splits and
|
|
stuffed into the new account tree.
|
|
<li>Finally, the GnuCash engine is asked to merge the old account
|
|
tree with the new account tree.
|
|
</ul>
|
|
|
|
<p><a href="#toc">Table of Contents</a>
|
|
|
|
<a name="hints"><h2>A few hints</h2></a>
|
|
|
|
<a name="opening-balance"><h3>Opening Balance</h3></a>
|
|
<p>If your Quicken files have "Opening Balance" records, you will
|
|
see an account called "Opening Balance" in the Accounts tab.
|
|
Accounting for the source of opening balances is sort of a hassle,
|
|
when you think about it, because they come from accounts that are
|
|
outside the scope of the GnuCash universe. The suggestion I've seen
|
|
on the gnucash-devel list is to make Opening Balances point to a
|
|
GnuCash account called "Retained Earnings", of type Equity. I don't
|
|
exactly understand this but it seems reasonable, and it's the default
|
|
for accounts called "Opening Balance".
|
|
|
|
<a name="empty-category"><h3>Empty category</h3></a>
|
|
|
|
<p>In the Categories display, you may notice a blank QIF Category
|
|
entry. Quicken transactions are not required to have a Category, but
|
|
GnuCash transactions are required to have a source and a destination.
|
|
The blank category lets you select which GnuCash account all
|
|
uncategorized transactions go to. This will generally be
|
|
miscellaneous checks you have written, cash withdrawals, and so on, so
|
|
you probably want to put these in a "Misc Expenses" account or
|
|
something similar. It may make sense to put this in an equity
|
|
account; let me know if there's a good explanation for how it should
|
|
be.
|
|
|
|
<a name="dividend-category"><h3>Dividend category</h3></a>
|
|
|
|
<p>Quicken stock transactions have a recognizable pattern for
|
|
dividend payments. If the importer can definitely tell that a
|
|
transaction is a transfer from dividends then it will default to
|
|
creating a "Dividend" income account. This category is usually not
|
|
present in the Quicken file, so it's being manufactured out of
|
|
nowhere.
|
|
|
|
<a name="fund-families"><h3>Fund families</h3></a>
|
|
|
|
<p>Quicken has the abstraction of a single account representing a
|
|
"fund family" for the purpose of allowing smooth transfers between the
|
|
various accounts administered within the family. The GnuCash Importer
|
|
will ALWAYS get this wrong the first time, because Quicken explicitly
|
|
puts the wrong information in the file. The "blanket" account
|
|
representing the fund family as a whole should probably be a Bank
|
|
account, since the transfers to and from it in the Quicken file are
|
|
denominated in currency, not shares. The balance of such an account
|
|
is supposed to always be 0 since you just use it as an intermediary
|
|
between two accounts in the family. Hopefully I'll fix this at some
|
|
point if someone tells me how it's supposed to work.
|
|
|
|
<a name="brokerage-accounts"><h3>Brokerage accounts</h3></a>
|
|
|
|
<p>Brokerage accounts are really confusing to me. Basically, my
|
|
thinking is that the brokerage account itself should probably be a
|
|
Bank account. The only weirdness is in stuff like dividends paid from
|
|
securities to the brokerage account. If you're using a Dividend
|
|
account, you can lose the information about where the dividend came
|
|
from. The importer tries to save this information by putting the
|
|
security name in the Payee slot (which shows up in the GnuCash
|
|
Description field for the transaction). If you have a better idea,
|
|
let me know.
|
|
|
|
</body>
|
|
</html>
|
|
|