Good day,
I believe that I am missing a piece of information to fully grasp the getActiveSheet method of the SpreadsheetApp class. Referring to the Apps Script documentation, its usage seems to be very straight forward:
The active sheet in a spreadsheet is the sheet that is being displayed in the spreadsheet UI.
However, I find that no matter which sheet tab is displayed in the UI, the getActiveSheet method always chooses the first sheet (tab) of a multi-sheet spreadsheet as the 'active' sheet. I've even tried hiding the first sheet to trick it - no, it still insists that first sheet is the active sheet.
Please help me to be understand this method.