UPDATE: Removed temporarily from the repository because the source is not available.
There will be a version available soon as a plugin


                          csvConverter-0.2
                          ----------------
The purpose of the program is to convert CSV format files to QIF format, to allow import into KMyMoney. It is written in C++, and requires QT4 and KDE4.  Its primary focus is on converting bank statements, but I have now added a basic capability to import some investment statements.

A well-known drawback of QIF format is that it is a fairly loose format.  With CSV files, there is this same problem, only more so.  With investment files, there is much more scope for variation in describing investment activities.  I've tried to handle this by having these activity types listed in a resource file (~/.kde4/share/config/csvconverterrc), allowing the user to add any that I haven't encountered.

INSTALLATION
------------
Just move/copy the resource file csvconverterrc to the appropriate directory, usually ~/.kde4/share/config/.

OPERATION
---------
a) Banking.  This is fairly straight forward.  First, make the program executable: chmod u+x csvConverter.  Then enter ./csvConverter and select your input csv file.  Set the date format to match your file, also the field delimiter character.  The file will now be displayed, so select the appropriate column numbers.  If your file has just a single column for the amount, click that radio button, then the column number.  Or, if there are two columns - debit/credit - click that radio button.  If a mistake is made, clear the selections and try again.  If you wish to save more than one column in the memo field, just select those columns sequentially.

Then, set the start line to skip any headers, and also set the end line to drop any trailer lines.  The display will update, and once you are happy, click Import (or Accept) and then save the qif file.

b) Investment.  Click on 'Go to Investments' at the top, and a new window will open.  Follow a similar procedure to the above.  The Type/Action column is where the activity is described - buy, sell, reinvest, etc.  The Price Fraction setting is for matching the imported pricing units with the existing pricing, where for instance one is in $ and the other in cents, or £ versus pence, etc.  Select the fee column according to whether any fee is involved, and click the 'Fee is Percentage' box if the imported fee is a percentage rather than a value.  (Just a warning here.  It may be that the fee has been taken into account in the unit price.  If so, don't select the fee column, although it may be retained by selecting the fee column as another memo column.)  Then, enter the name of the security, ensuring it  matches the existing security.  If the security name is in the imported file, double click on it, then copy and paste/edit to match.

If any transaction involves another account - ie. a checking account for a received dividend or for a payment, etc., then, when accept is clicked, a message box will pop up for the account name to be entered for the transfer.  If the investment account allows for, say, writing cheques, you may enter an existing checking/brokerage account name.  Similarly enter the column number containing the payee.  Finally, Save as QIF.

If you find that your investment statement includes activity types that are not recognised, just add them to the fields in the resource file.  For instance, in the [InvestmentSettings] section, the BuyParam field includes Purchase, Buy, New Inv, Switch In values.  If you find a different one, add it to the list and restart the program.  You may notice that there are similarities in the different fields, and you may find that the wrong activity type is being selected.  The program checks these lists in the following order - Shrsin, DivX, Reinvdiv, Brokerage, Buy, Sell, Remove.  I've tried re-ordering the lists to suit this, but I've found that the entries get sorted into alphabetical order.  If the offending parameter is one you don't need, just delete it.  If that's not possible, you may need to edit your file before input.  Just another warning here.  It may appear that the displayed entries may be edited, and in fact they they may, but the edits are not kept.  The display is purely for display, not for editing.

I've included a couple of sample csv files in the hope that they may help.  For example, in the investment sample, an activity type is "ReInvestorContract Buy         : ReInvested Units".  As the comparison method is on 'contains', the first successful match is on the ReInv in ReInvestorContract Buy, which therefore gets classed as Reinvdiv.
