System closed this discussion
on 27 Aug, 2019 02:50 PM.
rapscallion re-opened this discussion
on 17 Sep, 2019 04:41 PM
Sean Reilly on 17 Sep, 2019 09:04 PM
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 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.
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.
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.
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).
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.
Sean Reilly on 04 Mar, 2020 11:44 AM
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.
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.
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)"