kevinschaich / mintable

🍃 Automate your personal finances – for free, with no ads, and no data collection.

Home Page:https://kevinschaich.io/mintable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to figure out how to have formulas and charts on all sheets.

Sean0203 opened this issue · comments

I've been experimenting with Mintable and I really love it. But I'm just having a hard time automatically having my formulas and charts on my google sheet once a new month is added. Could somebody point me towards the right direction?

Actually, I've been wondering about this for a while as well, so I decided to do some research since I'd like to use this repo to setup my own finances, and this question seemed important. I think the reason why it's not in the docs or readme is because there isn't a simple way to do it. Arguably, that's exactly why it should be documented.

If I had to guess, adding a template during setup was supported in 1.x.x via the setup script, and somehow this didn't make it to 2.0's setup script. But porting the config from 1.x.x supports persisting the template. So all the old users (and developers) that were already using the software are happy, and new users either give up or just don't use a template.

You need to manually edit the mintable.jsonc config file. The config file has an "integrations" field. You'll need to modify the google entry (from here)

Within the Google config, you have a template field:

export interface GoogleConfig extends BaseIntegrationConfig {
  ...
  template?: GoogleTemplateSheetSettings
}

Of type GoogleTemplateSheetSettings

Now, I haven't tested this yet (will update once I do), but I believe something like this in your config file should do the trick:

mintable.jsonc

{
...
"integrations": {
    "google": {
        ...
        "template": {"documentId": "....", "sheetTitle": "Title of the template sheet."},
    }
}

Thanks for the help, this worked for me. Since this seems to still work past 2.0, it would be nice if this feature was referenced in the documentation, unless it's deprecated (sad if that's the case).

For anyone else trying to achieve the same thing, make sure to delete existing sheets to apply the template, because existing ones don't seem to get completely overwritten if you suddenly add a template. You also don't have to make another google sheets document to make the template, since in the config you are providing the document id and the sheet title.

Thanks for the help, this worked for me. Since this seems to still work past 2.0, it would be nice if this feature was referenced in the documentation, unless it's deprecated (sad if that's the case).

For anyone else trying to achieve the same thing, make sure to delete existing sheets to apply the template, because existing ones don't seem to get completely overwritten if you suddenly add a template. You also don't have to make another google sheets document to make the template, since in the config you are providing the document id and the sheet title.

Can you tell me how you implemented this change? I don't know how to use my own fork.

@Sean0203 Any update on this? I am trying to implement this myself, but I am not understanding how it is supposed to work. So, I create a spreadsheet that uses data from my transactions (like any sum formulas and whatnot) and then when I implement this change is it supposed to automatically move my formulas to the new month?