Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sean0203 opened this issue Aug 5, 2023 · 4 comments
Open

Comments

@Sean0203
Copy link

Sean0203 commented Aug 5, 2023

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?

@jsharf
Copy link

jsharf commented Aug 8, 2023

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."},
    }
}

@Sean0203
Copy link
Author

Sean0203 commented Aug 8, 2023

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.

jsharf added a commit to jsharf/mintable that referenced this issue Aug 8, 2023
The Google integration setup script now prompts the user, asking if they'd like
to set a template for the integration.

Response to kevinschaich#162
@werei
Copy link

werei commented Feb 8, 2024

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.

@werei
Copy link

werei commented Feb 27, 2024

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants