How to get list of sheets names in Google sheets?
This article, I will introduce some methods to get the name of current sheet name or a list of sheet names in Google sheets.
Get the current sheet name in Goolge sheets with script
Get a list of sheet names in Google sheets with script
Get the current sheet name in Goolge sheets with script
To get the current sheet name in Google sheets, the following simple script can help you without entering the name manually, please do as this:
1. Click Tools > Script editor, see screenshot:
2. In the opened project window, copy and paste the below script code into the blank Code window, see screenshot:
function sheetName() {
return SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getName();
}
3. Then save the code window, and go back to the sheet that you want to get its name, then enter this formula: =sheetname() in a cell, and press Enter key, the sheet name will be displayed at once, see screenshot:
Get a list of sheet names in Google sheets with script
If you want to get all sheet names in the Google sheets, here is another script can do you a favor, please do as this:
1. Click Tools > Script editor to go the project window, and then copy and paste the below script code into the blank Code window, see screenshot:
function sheetnames() {
var out = new Array()
var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
for (var i=0 ; i<sheets.length ; i++) out.push( [ sheets[i].getName() ] )
return out
}
2. Then save the code window, and go back to the sheet that you want to get all sheet names, then enter this formula: =sheetnames() in a cell, and press Enter key, all sheet names in the Google sheets will be listed as following screenshot shown:
List all sheet names and navigate between them by using hyperlinks or buttons in Excel workbook:
With Kutools for Excel's Create List of Sheet Names utility, you can quickly list all worksheet names in a new sheet with hyperlinks or macro buttons, then you can navigate between them to your need.
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now! |
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

















