importQIFIntoAccount question

rapscallion's Avatar

rapscallion

28 May, 2019 02:43 PM

I am attempting to load transactions parsed from a PDF file into Moneydance. I am using the importQIFIntoAccount Java API call which seems to work just fine when Common.QIF_MODE_TRANSFER is used, but no transactions appear when using Common.QIF_MODE_DOWNLOAD is set. I am not sure why, any ideas...? That is the only parameter I am changing on the API call, the file content I am using is not changing.

I am tracing this using Eclipse and can see that the file is being read correctly (line by line), however it seems that no txns are being setup in the txn set when Common.QIF_MODE_DOWNLOAD is used. An example of the rows in the QIF file being imported are:

!Type:Bank
D2019-05-20
T-1246.19
NB8E21SQA00JA004V
C
PJoe Bloggs
L
MSaldo beheer xxxxx318
^
D2019-05-20
T-86.56
NB8E20AG2JK000023
C
PAlbert Heijn
L
MABC 20-05-2019 16:52
^

  1. System closed this discussion on 27 Aug, 2019 02:50 PM.

  2. rapscallion re-opened this discussion on 17 Sep, 2019 04:41 PM

  3. Support Staff 1 Posted by Sean Reilly on 17 Sep, 2019 09:04 PM

    Sean Reilly's Avatar

    Hi Mike,

    Ah, sorry, those QIF import functions are outdated and probably won't work very well anymore. We've reimplemented QIF import and there's now a much better way to do it. Currently the easiest interface to it is to call getUI().importFile(fileToImport:File) or getUI().importFile(fileToImport:File, newDataSet=false, defaultDestinationAccount:Account)

    That will automatically select the best importer (QIF, text delimited, OFX) as well as the best mode (downloaded, from-another-app, etc).

    Thanks,
    Sean

    --
    Sean Reilly
    Developer, The Infinite Kind
    https://infinitekind.com

  4. 2 Posted by rapscallion on 17 Sep, 2019 11:50 PM

    rapscallion's Avatar

    Hi Sean,

    Thanks for your reply. I can see the getUI().importFile(fileToImport:File) method, but using this brings up the UI import dialog and when I then request the load Moneydance hangs.

    As I have a number of QIF files to load each time and the fact that I know which account each needs to be loaded, I would really like to use the getUI().importFile(fileToImport:File, newDataSet=false, defaultDestinationAccount:Account) method, but I don't see this as an available choice in the method completion in Eclipse - please see the attachment for details.

    Any ideas?

    Regards, Mike.

  5. 3 Posted by rapscallion on 18 Sep, 2019 07:33 AM

    rapscallion's Avatar

    Hi Sean,

    Thinking about this a little more, I would rather not have the UI present any dialog to the user at all, I would prefer instead to be able to load the QIF files directly. I noticed in an older posting on a different but similar question (see https://infinitekind.tenderapp.com/discussions/moneydance-developme...) you made a comment to the effect that there is a more direct API available?

    "...There's a deeper API that will also let you import a bit more directly, but I'd recommend going with the one above."

    Can you please let me know what that deeper API call is? In my case, I know the file type (QIF), the date format and the receiving account so I don't want to bother the user with any unnecessary UI interaction.

    Thanks in advance.

    Regards, Mike.

  6. 4 Posted by rapscallion on 26 Oct, 2019 08:09 AM

    rapscallion's Avatar

    Hi Sean,

    I have resolved my immediate issue by transforming input files into a common CSV format (rather than QIF) and then using the TabularTextImport functionality which is working well for standard bank and credit card accounts.

    Now, I still think that a similar (deeper) QIF API loader should be supported, so would still like to get that information please so I can support other account types such as investment accounts. As far as I can see, the TabularTextImport cannot support those...?

    Any info you can provide on the deeper QIF loader methods would be useful. Thanks in advance.

    Regards, Mike.

  7. 5 Posted by rapscallion on 20 Nov, 2019 05:22 PM

    rapscallion's Avatar

    Hi Sean,

    Any update on the documentation for the "deeper" api to load QIF files directly? In the meantime I am leveraging the CSV loader directly, but this doesn't give me split txn support nor does it allow import of securities data... I really need direct access to the lower level QIF loader (like it used to be supported in earlier versions).

    Regards, Mike.

  8. 6 Posted by rapscallion on 26 Jan, 2020 07:35 PM

    rapscallion's Avatar

    Hi Sean,

    Happy New Year, any chance I will get an answer on this soon?

    Regards, Mike.

  9. 7 Posted by rapscallion on 04 Mar, 2020 11:36 AM

    rapscallion's Avatar

    I suspect that you guys are not interested in this topic, so I guess we can close it.

    It's a pity that I will need to do low level transaction insertion one row at a time through the API rather than leveraging the inbuilt QIF loader directly via the API. This will be required because as far as I can tell the CSV loader is not capable of loading stock data and/or split transactions.

  10. Support Staff 8 Posted by Sean Reilly on 04 Mar, 2020 11:44 AM

    Sean Reilly's Avatar

    Hi Mike,
    Sorry, I've been spread a bit thin lately. We definitely need to expose this. I ran into a minor obstacle with providing access to the underlying importing function, but I really should add a convenience method in the meantime to import from various formats with a UI/no-UI flag.

    Please do keep this open!

    Thanks,
    Sean

    --
    Sean Reilly
    Developer, The Infinite Kind
    https://infinitekind.com

  11. 9 Posted by rapscallion on 06 Mar, 2020 05:13 PM

    rapscallion's Avatar

    Hi Sean,

    Thanks for this consideration, that would indeed help ā€” would you please be able to let me know when this might be ready to test? Iā€™d be happy to help.

    Regards,

    Mike.

    Michael P. Leznar
    Director | Leznar Software & Services BV
    www.leznarsoftware.com
    Tel: +31 6 2185 6272

  12. 10 Posted by Dan P on 28 May, 2020 04:48 PM

    Dan P's Avatar

    Sean and All,
    I'm glad I found this topic and wish to add my support also. I've developed a Java program to access my bank and download QFX files by date range. I run it each day and manually import the files to MD. It really does save me time.
    I was starting to develop an extension to import the stream directly, but as you have indicated, there is no access to the ImportFile API without the UI.
    I will continue to develop my extension in the hope that when I have it ready, the non-UI API will be available.

    Keep up the good work!

  13. 11 Posted by Dan P on 30 May, 2020 06:50 PM

    Dan P's Avatar

    Sean,

    I may be a little daft but I cannot find any API documentation to implement what you suggested to Mike.
    "Currently the easiest interface to it is to call getUI().importFile(fileToImport:File) or getUI().importFile(fileToImport:File, newDataSet=false, defaultDestinationAccount:Account)"

    Can you give me a push in the right direction?

    *** I figured it out and it actually works.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ā†© Submit the comment

You can use Command āŒ˜ instead of Control ^ on Mac