Importing QIF files

Derek Atkins derek at ihtfp.com
Thu Feb 5 13:14:35 EST 2015


Hi,

On Thu, February 5, 2015 12:41 pm, Mark Wigmore wrote:
> Progress! I removed all the CX strings from the T lines and it gets
> through
> the parser!

Excellent.

> I have a new problem now in that all my non-GBP holding are no longer in
> their original currency. I'm also a bit baffled by the attached. What do I
> select for a stock on the London exchange?

Thats not too surprising.  QIF does not support multiple currencies. 
That's probably what the underlying issue is; the other app did
*something* to create their own way to store a multi-currency transaction,
but there is no standard for it.

The best way to handle multiple currencies in QIF is to make multiple QIF
files, one for each currency.  Alas, that's really the only thing you can
do, and you still might have issues importing the cross-currency
transactions.

The "Exchange or abbreviation type" is just a way for you to collect
similar stocks together.  It's a free-form text entry with a set of
pre-defined entries.  If none of the existing entries works for you then
you can just type in your own.

> Mark

-derek

>
> On 5 February 2015 at 17:35, Mark Wigmore <mawigmore at gmail.com> wrote:
>
>> Here's a screenshot of the last few entries from the first pass of the
>> importer.
>>
>> Nearly everything above that is of the first type, unrecognised
>> reconciliation status.
>>
>> Yes, seems to be specifying the type of account:
>>
>> !Account
>> NBarnsley
>> DBarnsley Building Society
>> TBank
>> ^
>>
>> Let me know if you need anything else.
>>
>> Mark
>>
>> On 5 February 2015 at 17:16, Derek Atkins <warlord at mit.edu> wrote:
>>
>>> Hi,
>>>
>>> Mark Wigmore <mawigmore at gmail.com> writes:
>>>
>>> > On 4 February 2015 at 14:29, Derek Atkins <warlord at mit.edu> wrote:
>>> >
>>> >     I understand you're unwilling to do that, but honestly, it's not
>>> that
>>> >     hard to do something like:
>>> >
>>> >     grep '^N$' file.qif
>>> >
>>> >
>>> > I get 2369 matches! The first in investments is this on line 21301:
>>> >
>>> > !Type:Invst
>>> > D01/01/1970
>>> > T3612.25CX
>>> > N
>>> > POpening Balance
>>> > M
>>> > L[Start Balance]
>>> > ^
>>>
>>> Aha!!  The "CX" is wrong in the T line, and is probably what's causing
>>> the issue here.  I guess my regex didn't look for non-numerics at the
>>> end of the string, which would have brought this up.
>>>
>>> Is CX supposed to be a currency?  Or a stock?  I'm not sure.  Either
>>> way, this is why the number format cannot be parsed by the importer.
>>>
>>> >     egrep '^T[^-0-9]' file.qif
>>> >
>>> > 101 matches, but they all have T followed by text, TBank, TInvst,
>>> etc.
>>> I'm
>>> > afraid I'm not familiar enough with these searches to look further.
>>>
>>> For these I'd have to see the context around these items to understand
>>> what it is.  My guess is that it's within the Account List, specifying
>>> the Account Type.  I don't see any invalid types here, so that's not an
>>> issue.
>>>
>>> Assuming you haven't completely given up yet, could you remind me the
>>> actual QIF import error(s) you were getting?
>>>
>>> > Mark
>>> [snip]
>>>
>>> -derek
>>> --
>>>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>>>        Member, MIT Student Information Processing Board  (SIPB)
>>>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>>>        warlord at MIT.EDU                        PGP key available
>>>
>>
>>
>


-- 
       Derek Atkins                 617-623-3745
       derek at ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant



More information about the gnucash-user mailing list