Adds a new row of data at the bottom of the sheet.
class SpreadsheetApp method .appendRow()
SpreadsheetApp is the Apps Script service.
.appendRow() is the method name you will see after a dot in your code.
What it does
Why it's used
- Log form submissions or webhook events as a new bottom row.
- The classic add-one-record-to-a-tracker pattern.
Common errors
- Forgetting parentheses on appendRow. Write SpreadsheetApp.appendRow(), not SpreadsheetApp.appendRow or appendRow by itself.
- Skipping dots between chained calls. Each step needs a dot, like SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data').appendRow().
- Adding spaces where they do not belong. Write SpreadsheetApp.appendRow(), not SpreadsheetApp .appendRow(), SpreadsheetApp.appendRow (), or SpreadsheetApp . appendRow().
- Wrong capitalization. Use SpreadsheetApp and appendRow, not spreadsheetapp or appendrow.
3 Snippets using this methods
Explore
Related methods
-
.insertRows()
Inserts one or more blank rows at a given position.
-
.insertSheet()
Adds a new sheet tab to the spreadsheet.
-
.deleteRow()
Deletes a single row from the sheet.
-
.getLastRow()
Returns the row number of the last row that has content.
-
.create()
Creates a new blank spreadsheet file in Drive.
More Apps Script
3 Better Sheets tutorials
Access Free API's with Google Sheets
Automatic Screenshots in Apps Script
Basic CRM - Add a Powerful Script To Move Row Based on Status
Related blog posts
Written guides about SpreadsheetApp.appendRow().
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 →How to reference a different Google Spreadsheet in Apps Script?
Transferring Data Between Cells in Different Spreadsheets
Read post →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 →