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

Adds a divider line between menu items.

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.

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.

Better Sheets tutorials

Automate Emails

Automate Emails

Set up automated email notifications based on Google Sheets data. Super ...
Automatically Clear Content | Refresh Reuse Recycle Templates

Automatically Clear Content | Refresh Reuse Recycle Templates

Create automatic functions to clear content.
Automatic Calculations

Automatic Calculations

Create custom scripts to make your spreadsheets more like tools.
Built a Cookie Clicker Clone in Google Sheets

Built a Cookie Clicker Clone in Google Sheets

I built a clone of Cookie Clicker, live on YouTube. Watch the full 1 hou...
Different Kinds of Automation

Different Kinds of Automation

A brief description of types of automation. I go way more in depth in “M...
Fast FAQS

Fast FAQS

New Tool for you: Fast FAQs. Create a quick 10 question FAQ for any new ...
Google Maps Scraper for Outreach

Google Maps Scraper for Outreach

Get this fun template to search on google maps via API, and quickly mess...
Scrape Google Maps

Scrape Google Maps

Scrape any query in Google Maps into your Google Sheets. Enter your API ...
Scrape Google Maps Added Phone and Reviews

Scrape Google Maps Added Phone and Reviews

Added two helper functions to get Phone numbers and reviews of the Googl...
Twitter App Clone in a Google Sheet

Twitter App Clone in a Google Sheet

I built a twitter clone in Google Sheets

Related blog posts

Written guides about SpreadsheetApp.addSeparator().

Browse the blog