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.

3 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.

Related blog posts

Written guides about SpreadsheetApp.addSeparator().

Browse the blog