Home > Back-end >  Is there a way to lock a sheet's position in a spreadsheet as always first?
Is there a way to lock a sheet's position in a spreadsheet as always first?

Time:10-01

I have created a script that opens a new spreadsheet every month (on the first day of the month) and enters the necessary data into that sheet. Apart from this sheet, I also have a changeLog sheet that counts how many lines have been entered into the monthly sheets.

Now, this script of mine, whenever it's opening a new sheet, it is putting it in the first place, moving all the other sheets to the right. changeLog sheet is at the very end of the row and will eventually leave the preview. Is there a way to lock the changeLog to the very left and keep it there?

Image for better context:

CodePudding user response:

When inserting sheet, use insertSheet(index) or insertSheet(sheetName,index) with a index greater than or equal to 1.

  • Related