Google Apps Script, Custom Functions
Boy, are these titles getting longer.
But that’s pretty much the gist of it. In this post we will look at creating a Google Apps Script Custom Function that allows you to do Three things in Google Sheets:
- Get the current sheet name. That’s the same sheet name as the cell you are working in.
- Get all the sheet names. A full list of all the sheet names.
- Get the name of the Spreadsheet file.
The above picture is pretty self-explanatory. If you type in:
=SHEETNAME(#)
Where “#” is a number 0, 1 or 2 you will get the results displayed in the picture. Any other number will display an error.