How do I import OFX files?????

David Reiser dbreiser at earthlink.net
Fri Mar 5 00:48:24 EST 2010


On Mar 5, 2010, at 12:01 AM, Bob Smits wrote:

> I may have discovered something important.
> 
> My version of the .ofx file created is apparently 1.02. This means, I think, 
> that it is using sgml instead of xml to generate the file.
> 
> Is the generic matcher expecting an xml file?

No. version 1.02 is by far the most common version ofx files are written to. I get ofx files from something like 10 places, and they're all 102.
> 
> Bob
> 
> -- 
> Robert Smits Email bob at rsmits.ca
> 


You've shown us the header. Can you disguise the information later in the file enough to send more of a sample? My first guess is that there's a problem with data in the <FITID> fields. If you could leave the header in, and include disguised stuff from there until you get a couple <STMTTRN> ... </STMTTRN> blocks, then delete everything up to the last </STMTTRN> and then include the remainder of the file (disguised as necessary)? We might be able to make sense of your issue, and possibly remove your ofx files as the cause.

What happens if you copy the following into a text file and try importing it?

------------start sample here---------------
OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20080715135822.000

<OFX><SIGNONMSGSRSV1><SONRS>
<STATUS><CODE>0<SEVERITY>INFO<MESSAGE>Success</STATUS>
<DTSERVER>20080715175824.000[0:GMT]<LANGUAGE>ENG
<DTPROFUP>20050814070000.000[0:GMT]
<DTACCTUP>20080715023620.000[0:GMT]
<FI><ORG>B1<FID>10898</FI>
</SONRS></SIGNONMSGSRSV1>
<CREDITCARDMSGSRSV1>
<CCSTMTTRNRS>
<TRNUID>20080715135822.000
<STATUS>
<CODE>0
<SEVERITY>INFO
<MESSAGE>Success
</STATUS>
<CLTCOOKIE>1
<CCSTMTRS>
<CURDEF>USD
<CCACCTFROM>
<ACCTID>123456789012345
</CCACCTFROM>
<BANKTRANLIST>
<DTSTART>20080617120000[0:GMT]
<DTEND>20080714120000[0:GMT]
<STMTTRN>
<TRNTYPE>DEBIT
<DTPOSTED>20080617120000[0:GMT]
<TRNAMT>-48.80
<FITID>2008061755432868168000841856610
<NAME>Some Merchant
</STMTTRN>
</BANKTRANLIST>
<LEDGERBAL>
<BALAMT>-158.89
<DTASOF>20080715120000[0:GMT]
</LEDGERBAL>
<AVAILBAL>
<BALAMT>4841.11
<DTASOF>20080715120000[0:GMT]
</AVAILBAL>
</CCSTMTRS>
</CCSTMTTRNRS>
</CREDITCARDMSGSRSV1></OFX>
------------------end of sample----------------------
That's from a credit card account, but you should at least see gnucash asking for an account to associate with 123456789012345.
If you tell gnucash to create a new account for this one, then you ought to see one transaction in the generic matcher window (in yellow, since it can't know where you want the second split to go.

Dave
--
David Reiser
dbreiser at earthlink.net






More information about the gnucash-user mailing list