Opens a custom sidebar built with HtmlService.
class SpreadsheetApp method .showSidebar()
SpreadsheetApp is the Apps Script service.
.showSidebar() is the method name you will see after a dot in your code.
What it does
Why it's used
- Give users a control panel with buttons and filters beside the sheet.
- Better Sheets-style tools often live in a sidebar instead of menus alone.
Common errors
- Forgetting parentheses on showSidebar. Write SpreadsheetApp.showSidebar(), not SpreadsheetApp.showSidebar or showSidebar by itself.
- Skipping dots between chained calls. Each step needs a dot, like SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data').showSidebar().
- Adding spaces where they do not belong. Write SpreadsheetApp.showSidebar(), not SpreadsheetApp .showSidebar(), SpreadsheetApp.showSidebar (), or SpreadsheetApp . showSidebar().
- Wrong capitalization. Use SpreadsheetApp and showSidebar, not spreadsheetapp or showsidebar.
Explore
Related methods
-
.createMenu()
Builds a custom menu in the spreadsheet toolbar.
-
.addToUi()
Publishes a custom menu to the spreadsheet UI.
-
.showModalDialog()
Opens a modal dialog that blocks interaction with the sheet.
-
.showModelessDialog()
Opens a dialog the user can use while still working in the sheet.
-
.getUi()
Returns the UI object used to build menus and show dialogs in Sheets.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about SpreadsheetApp.showSidebar().
How to Use Google Sheets as a Website Database
Did you know you can use Google Apps Script to turn a Google Sheet into a free, auto-syncing database for your website? This guide shows you exactly how to set it up. You’ll prepare your spreadsheet, write a few lines of code and publish your site. Don’t worry if you’re not a developer, we’ll walk you through it. Why Use Google Sheets as a Database? For small projects, Google Sheets offers many advantages over traditional databases: * Free hosting and storage * Easy to edit data without...
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 →Explore Coding in Google Sheets
Did you know you can actually code in Google Sheets?
Read post →