0
votes

I have a single spreadsheet that answers from an unlimited amount of dynamically created google forms go to, and each form means a new sheet(tab).

While I'm iterating through the sheets, doing what I need to do with the data, I want to clean up and delete any sheets over 3 weeks old to keep this from getting too crazy.

I have pretty much all the logic figured out, except I can't figure out how to get when that specific sheet was created.

There is the Drive Method getDateCreated() for files, but it will not work on sheets.

thanks

2

2 Answers

0
votes

Since your sheets are created from a form, there should be a timestamp created on the sheet. I would try using the timestamp to select the sheets to be deleted. As far as I know, there is no date created for a sheet.

0
votes

This is a similar problem to what I needed in in this other post, I wanted to pass the email of user. We don't need their email on here unless they complete the form, so I made a different workaround. If, like I was initially looking for here, there was a way to pass a timestamp to sheet upon form creation, that would work.