Skip to content

Conversation

@tsolid
Copy link

@tsolid tsolid commented Jan 4, 2020

I added the ability to rotate to a new sheet on a monthly cadence in case you have a lot of events each month/quarter/year.

@loverso
Copy link

loverso commented Oct 17, 2020

Is there any way to make this selectable from the SmartApp? I wouldn't want to have every sheet rotating every month.

@tsolid
Copy link
Author

tsolid commented Oct 19, 2020

Having it configurable in the ST App would require another config var that is set and passed along in the call to google - lots of overhead when someone could just comment out the lines. I have a lot of data being written and so I end up with 1000s of entries and this was an easy way to separate it each month.

@shackrock
Copy link

shackrock commented Feb 2, 2021

Question @tsolid - If I implement this code.gs in google without any smartapp changes, how does the smart app know which sheet ID to use? I would assume the ID keeps changing and I need to come in and edit the smart app each month, is that right?

Also do I need to follow a naming scheme in my starting excel sheet here for this to succeed on first setup? Thanks!

@tsolid
Copy link
Author

tsolid commented Feb 2, 2021

Hey @shackrock it's the same workbook - it creates a new sheet each month, using the format yyyy-MM. Check out the screen shot from one of the ones I have setup:

image

So you won't need to change the workbook-id each month.

On first-run you can either have a sheet already created following yyyy-MM or it will auto-create one.

@shackrock
Copy link

Oh! I thought that a workbook had a limit even if you split it accross different sheets. My whole intent is to avoid filling up a workbook to the max capabilities of google docs really, this may not be a solve for that then, would it?

@tsolid
Copy link
Author

tsolid commented Feb 2, 2021

Oh! I thought that a workbook had a limit even if you split it accross different sheets. My whole intent is to avoid filling up a workbook to the max capabilities of google docs really, this may not be a solve for that then, would it?

It looks like the limit is 5 million cells - or if you use the default number of cells per sheet someone was able to make 193 sheets.
https://support.google.com/docs/thread/5252676?hl=en&msgid=29381206

So unless you're writing a TON of data then I think you're safe :)

@shackrock
Copy link

Hm, ok - I think you're right. I should be able to make one sheet a year essentially, and be totally fine, makes sense, thanks!

@loverso
Copy link

loverso commented Feb 2, 2021

I also answered you in the forum; I'm writing a TON of data and need multiple workbooks.
https://community.smartthings.com/t/log-events-to-google-sheets-see-post-36719-154-for-current-github-repo-and-v1-1/36719/494?u=jlv

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

Successfully merging this pull request may close these issues.

3 participants