How to divide a google spreadsheet (with about 100 sheets) in two (or more) spreadsheets (of about 50 sheets each) in google-apps-script ?
Alas, due to a google bug (see https://productforums.google.com/d/topic/docs/H2ZakBguOgk/discussion), I can’t copy the entire spreadsheet file and delete some sheets in each spreadsheets.
I can only copy sheets one by one on another spreadsheet, then delete the original sheet(s) if copy is a success.
Thanks in advance 😉
Here is a code snippet that should do what you want, I didn’t test it so maybe you’ll have to tweak some details but the general idea is there…
EDIT : I tested and made the corrections to make it work… sorry for the typos in first version