Skip to content

FAQ: Import Export

Michael Totschnig edited this page Apr 4, 2024 · 18 revisions

Can I send the QIF file to Google Docs or Dropbox?

Yes, in the settings, activate Share export file and leave Upload URL empty. After each export, you will see a chooser for selecting an app (like Google Docs or Dropbox) capable of sending the file.

How do I import categories in batch?

My Expenses can import your categories from your Grisbi file (from Settings -> Import -> Import from Grisbi). You can also import the parties (payers and payees) stored in this file. When you choose your custom file as import source, you can decide to import both parties and categories, or only categories. Parties will be used for the autocomplete function of the payer/payee field in the transaction form. If you create an XML file on your own, respect the following structure:

<root>
  <Category Nb="1" Na="Main category A" />
  <Sub_category Nbc="1" Nb="1" Na="Sub category A.1" />
  <Sub_category Nbc="1" Nb="2" Na="Sub category A.2" />
  <Category Nb="2" Na="Main category B" />
  <Sub_category Nbc="2" Nb="1" Na="Sub category B.1" />
  <Sub_category Nbc="2" Nb="2" Na="Sub category B.2" />
  <Party Na="N.N." />
</root>

This method only supports one level of subcategories. Alternatively, create a QIF category file, which allows to import a deeper hierarchy, for example:

!Type:Cat
NMain category A
^
NMain category A:Sub category A.1
^
NMain category A:Sub category A.1:Sub sub category A.1.1
^

Is there a schema for the JSON export?

Contributed by @klx0

Valid from v3.6.5:

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Schema for My Expenses JSON exports",
    "oneOf": [
        {
            "$ref": "#/$defs/account"
        },
        {
            "type": "array",
            "items": {
                "$ref": "#/$defs/account"
            },
            "minItems": 2
        }
    ],
    "$defs": {
        "account": {
            "type": "object",
            "properties": {
                "currency": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                },
                "openingBalance": {
                    "type": "number"
                },
                "transactions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/transaction"
                    },
                    "minItems": 1
                },
                "uuid": {
                    "type": "string",
                    "format": "uuid"
                }
            },
            "required": [
                "label",
                "openingBalance",
                "transactions",
                "uuid"
            ]
        },
        "transaction": {
            "type": "object",
            "properties": {
                "amount": {
                    "type": "number"
                },
                "category": {
                    "description": "Complete category tree for this transaction where each array item represents one segment of the category tree",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "minLength": 1
                    },
                    "minItems": 1
                },
                "comment": {
                    "type": "string"
                },
                "date": {
                    "type": "string"
                },
                "methodLabel": {
                    "type": "string"
                },
                "payee": {
                    "type": "string"
                },
                "attachments": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "referenceNumber": {
                    "type": "string"
                },
                "splits": {
                    "type": "array",
                    "items": {
                        "allOf": [
                            {
                                "$ref": "#/$defs/transaction"
                            },
                            {
                                "not": {
                                    "type": "object",
                                    "required": [
                                        "splits"
                                    ]
                                }
                            }
                        ]
                    },
                    "minItems": 1
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "UNRECONCILED",
                        "CLEARED",
                        "RECONCILED",
                        "VOID"
                    ]
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "transferAccount": {
                    "type": "string"
                },
                "uuid": {
                    "type": "string",
                    "oneOf": [
                        {
                            "format": "uuid"
                        },
                        {
                            "maxLength": 0
                        }
                    ]
                }
            },
            "required": [
                "amount",
                "date",
                "uuid"
            ],
            "dependencies": {
                "category": {
                    "not": {
                        "anyOf": [
                            {
                                "required": [
                                    "splits"
                                ]
                            },
                            {
                                "required": [
                                    "transferAccount"
                                ]
                            }
                        ]
                    }
                },
                "splits": {
                    "not": {
                        "anyOf": [
                            {
                                "required": [
                                    "category"
                                ]
                            },
                            {
                                "required": [
                                    "transferAccount"
                                ]
                            }
                        ]
                    }
                },
                "transferAccount": {
                    "not": {
                        "anyOf": [
                            {
                                "required": [
                                    "category"
                                ]
                            },
                            {
                                "required": [
                                    "splits"
                                ]
                            }
                        ]
                    }
                }
            }
        }
    }
}

How to configure header and footer on the PDF printout?

(Since version 3.8.1)

For each of the six positions (Left/Center/Right x Header/Footer) you can configure a different text, and make use of the following placeholders wrapped in {}:

date
the current date
generator
the localized name of the app, e.g. My Expenses for English.
page
the page number
For example, "This document was printed by {generator} on {date}" might result in "This document was printed by My Expenses on 04/04/2024"