| Home | |
![]() |
QIF Importer |
| Prev | Importing and Export | Next |
Generally speaking, the QIF format should be avoided wherever possible. It is a poor choice for transporting financial data. Among other thing, QIF suffers from these problems:
Lack of standardized format. Different versions of the same program will impart different meanings to the same element.
Lack of transaction identifier. Because there is no ID number associated with each transaction, matching duplicates is haphazard at best.
Lack of expressiveness. The grammar is really simple, and cannot portray the depth of financial information found in today's financial environment.
This is generally why Intuit stopped supporting QIF input at all with Quicken 2005. If you have the option of getting data some other way, like OFX, always choose that option.
To import a QIF file, first ensure you have a valid KMyMoney file open. Then select Import Qif from the File menu.

The resulting dialog prompts for the QIF filename allowing you to locate the file by clicking on the Browse button.
If you want KMyMoney to automatically enter new payees check the appropriate option otherwise KMyMoney will prompt you each time a new payee is found.
The QIF Profile is very important, because all QIF files are different. Please be sure it is set up correctly before continuing. See the next section for more details on that.
Click on Import to import the QIF file.
The first thing the importer will do is ask you which account to import the transactions into. If there are transactions from multiple accounts in your file, you will be asked this question multiple times.

After importing, some of your transactions may be flashing red in the ledger. This is because they need to be assigned a category. The importer was not able to automatically assign a category based on your past transaction history.
When KMyMoney has finished importing the QIF transactions the account will be shown with the imported transactions listed in Yellow.

Some of your transactions may be flashing red in the ledger. This is because they need to be assigned a category. The importer was not able to automatically assign a category based on your past transaction history.
Transaction data can be edited or even deleted if needed. To edit a transaction simply double click on the entry or hit enter when the entry is highlighted. Once finished click on OK to accept the imported transactions or Cancel to remove the imported transactions.
Please note that if you are importing a file with investment transactions, those investments must first exist in your KMyMoney file. The trading symbol is used to match, so please ensure that the symbol in KMyMoney is exactly the same as the one in the file you're importing.
Because there is no universally standard format for the QIF file, different vendors have taken liberties with the format, and introduced their own nuances. Therefore, you must create a QIF Profile before you can import a QIF file. This profile tells KMyMoney about the peculiarities of your file. To edit an existing QIF Profile, or to create a new one, press the "New" button on the QIF Import dialog, near the profile selector.

The most commonly changed thing between QIF implementations is the date format. So if this is the first time you're importing a QIF file, spend a few moments to figure out what format the dates are in, and set the QIF Profile accordingly. See the discussion below on apostrophe format for more details.

Many common QIF writers use a 2-digit representation for the year. This is ambiguous, because the importer cannot know which century the date belongs in. To make things even more complicated, QIF files will often used an apostrophe as a year separator to indicate that the date belongs in the OTHER century from the default.
For example, if the default century is 1900-1999, the date 12/31/95 would mean 1995. The date 12/31'05 would mean 2005.
Because the QIF format is not standardized, it's impossible to know which century is desired. This is why you have to explicitly state it in the QIF profile. You do this by specifying which century is intended when an apostrophe is found. In the example above, you would set the Apostrophe Format to "2000-2099", so dates with an apostrophe will be interpreted as being > year 2000. In this case, dates without an apostrophe will be treated as being in the 1900's.
As noted previously, one of the major drawbacks of the QIF format is the lack of a unique identifier for each transaction. Thus, if you import a QIF file and some of the transactions are already in your ledger, you may get duplicates. KMM attempts to get around this by looking for transactions that look similar to those you already have. If it finds something that looks like the same transaction, it will discard the apparent duplicate.
This can be a problem if you have transactions that look too similar but are actually different. In this case, you can try turning off the "Attempt to match similar transactions" option in the QIF profile.
Sometimes you may have data in a custom format, like comma-separated-values (CSV), or something else unique to your situation. You can still import that file into KMyMoney using a QIF Import Filter. A filter is a custom program you write which takes your special file as input, and produces a QIF file as output. This can be a shell script, a perl script, a compiled program written in C/C++, or anything else you can dream of, as long as the system can run it.
To use it, edit your favorite QIF Profile, and select the Filter tab. Enter the location of your filter program where prompted. Then, whenever you do a QIF import using this profile, the file you select for importing will be run through your filter first.
A common problem is to convert a list of comma-separated-values into a QIF file. This is a textbook case for the awk tool. Create a script called csv2qif.awk, with the following two lines as contents:
BEGIN { FS=","; print "!Type:Bank" }
{ print "D"$1; print "T"$2; print "N"$3; print "P"$4; print "M"$5; print "^" }
Then, change the QIF keys (D,T,N,P,M) to match the order of your csv data. Set the input filter to awk -f csv2qif.awk.
Another problem sometimes arises in the encoding of QIF files. KMyMoney expects files to be UTF8 encoded. If your file is encoded in something else, it can be useful to convert it to UTF8. For example to convert it from iso-8859-1, you would set the input filter to recode iso-8859-1..utf-8.
As noted previously, one of the major drawbacks of the QIF format is the lack of a unique identifier for each transaction. If you are writing your own QIF file creator (or filter, as described above), you can overcome this problem. KMyMoney supports the '#' field. The importer will interpret this as a unique transaction ID, and disregard it if the transaction is already in the system.
| Prev | Home | Next |
| Importing and Export | Up | QIF Exporter |