Adds a divider line between menu items.
class SpreadsheetApp method .addSeparator()
SpreadsheetApp is the Apps Script service.
.addSeparator() is the method name you will see after a dot in your code.
What it does
Why it's used
- Group related menu actions so the list is easier to scan.
- Separate admin tools from everyday actions.
Common errors
- Forgetting parentheses on addSeparator. Write SpreadsheetApp.addSeparator(), not SpreadsheetApp.addSeparator or addSeparator by itself.
- Skipping dots between chained calls. Each step needs a dot, like SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data').addSeparator().
- Adding spaces where they do not belong. Write SpreadsheetApp.addSeparator(), not SpreadsheetApp .addSeparator(), SpreadsheetApp.addSeparator (), or SpreadsheetApp . addSeparator().
- Wrong capitalization. Use SpreadsheetApp and addSeparator, not spreadsheetapp or addseparator.
2 Snippets using this methods
Explore
Related methods
-
.createMenu()
Builds a custom menu in the spreadsheet toolbar.
-
.addItem()
Adds a menu item that runs a function when clicked.
-
.addToUi()
Publishes a custom menu to the spreadsheet UI.
-
.insertSheet()
Adds a new sheet tab to the spreadsheet.
-
.appendRow()
Adds a new row of data at the bottom of the sheet.
More Apps Script
3 Better Sheets tutorials
Automate Emails
Automatically Clear Content | Refresh Reuse Recycle Templates
Related blog posts
Written guides about SpreadsheetApp.addSeparator().
Every Locale Listed in Google Sheets and a Tool to Save Your Sanity
If you live in a country that is not well represented with blog posts or someone makes a blog post about a Google Sheets issue, they create a Google Sheet formula and then you copy and paste it into your sheet and it has the wrong delimiter. How do you resolve that?
Read post →What's Better Than Google Sheets?
Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Google Sheets Locales. What are they?
Hello, Better Sheet members and non-Better Sheet members! This tutorial is about every locale listed in Google Sheets. If you live in a country that is not well represented with blog posts or someone makes a blog post about a Google Sheets issue, they create a Google Sheet formula and then you copy and paste it into your sheet and it has the wrong delimiter. How do you resolve that? I'm going to show you how you can fix that and how you can know if there's a problem. Locales. What are the...
Read post →