LesterCovax / crypto-sheets

Google Sheets script editor code for managing a cryptocurrency tracking spreadsheet
https://www.reddit.com/r/cryptosheets
GNU General Public License v3.0
482 stars 67 forks source link

Get or Create sheet specified by DEFAULT_SHEET_NAME #16

Closed deepakrb closed 6 years ago

deepakrb commented 6 years ago

Super simple, this PR means users won't have to create a sheet before using the template. Ideally the name Results should be changed going forward to something more semantic i.e CryptoLiveData or something along those lines.

Cheers

LesterCovax commented 6 years ago

Nice, this was something I wanted to do in addition to creating another sheet for balances. I just want to test this out first.

LesterCovax commented 6 years ago

Can you add in the Wallets sheet? Also, shouldn't the null check happen before setting the var? Haven't had a chance to test your code yet. May also want to rebase on the new changes.

deepakrb commented 6 years ago

Absolutely, I'll take a look at this today. On the null check, the return value from getSheetByName is null if the sheet is not found, so we never have to create a sheet if one already exists.

I'll also fix that MC

ddarbs commented 6 years ago

Added in pull request referenced above.