scripted CSV export?

Lionel's Avatar

Lionel

10 Jan, 2026 01:08 AM

I see that there is a moneydance.exportAllAccountsIntoQIF() function, but I don't see where it is documented. All I could tell from calling it is that it expects five arguments. Didn't show up in a search of the API docs. Can anyone provide enough details to use it?

  1. 1 Posted by dwg on 10 Jan, 2026 01:40 AM

    dwg's Avatar

    This question is probably best asked in the Extension Development Forum:

    https://infinitekind.tenderapp.com/discussions/moneydance-development

  2. 2 Posted by Stuart Beesley ... on 10 Jan, 2026 10:58 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    ...

  3. 3 Posted by Stuart Beesley ... on 10 Jan, 2026 10:58 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    The parameters are:

    com.moneydance.apps.md.controller.AccountBookWrapper wrapper
    java.io.File qifFile
    com.infinitekind.moneydance.model.CurrencyType currencyType
    com.infinitekind.moneydance.model.TxnFilter txnFilter
    com.infinitekind.moneydance.model.AcctFilter acctFilter
    

    The latter two filters can be supplied as null (None)

    Here is a basic script:

    from com.moneydance.apps.md.controller import AccountBookWrapper
    from com.infinitekind.moneydance.model import CurrencyType
    from com.infinitekind.moneydance.model import TxnFilter
    from com.infinitekind.moneydance.model import AcctFilter
    from java.io import File
    
    m=moneydance
    mdGUI=m.getUI()
    wrapper=m.getCurrentAccounts()
    book=moneydance.getCurrentAccountBook()
    baseCurrency=book.getCurrencies().getBaseType()
    
    class MyAcctFilter(AcctFilter):
     def __init__(self):
      pass  # perhaps store some variables here
    
     def matches(self, acct):
      return True  # check Account and then return True or False
    
     def format(self, acct): return acct.getAccountName()
    
    class MyTxnFilter(TxnFilter):
     def __init__(self):
      pass  # perhaps store some variables here
    
     def containsTxn(self, txn):
      return True  # check AbstractTxn and then return True or False
    
    qifFile=File("/Users/XXX/Downloads", "test-qif-file.qif")
    
    # passing account and txn filters
    m.exportAllAccountsIntoQIF(wrapper, qifFile, baseCurrency, MyTxnFilter(), MyAcctFilter())
    
    # or 
    #m.exportAllAccountsIntoQIF(wrapper, qifFile, baseCurrency, None, None)
    
    mdGUI.showInfoMessage("Export to QIF: '%s' COMPLETED" %(qifFile))
    

    I have not dug into this further, but should be enough to get you going. Let me know?

  4. 4 Posted by Lionel on 11 Jan, 2026 06:05 AM

    Lionel's Avatar

    That's what I was looking for, thanks! Output for me matches a default QIF export done via "File/Export..." in the GUI.

    I started posting here under "Problems" because the function wasn't showing up when using the search box of the API docs (https://infinitekind.com/dev/apidoc/index.html).

    I overlooked the Extension Development Forum because I'm coming at this from the automation standpoint (i.e. Python/Jython scripting). If that's also the right place for scripting, I'll go there rather than General Questions or somewhere else in the future.

  5. 5 Posted by dwg on 11 Jan, 2026 07:35 AM

    dwg's Avatar

    Personally, I would tend to post anything about programming Moneydance whether by a Java extension or by a python script in the Extensions forum.

    In both cases you are likely to be using the Moneydance API, it is just whether it is being done in Java or python.

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

Recent Discussions

14 Jan, 2026 04:26 AM
14 Jan, 2026 02:16 AM
14 Jan, 2026 01:38 AM
14 Jan, 2026 01:07 AM
14 Jan, 2026 12:43 AM