Home

SpreadsheetApp

SpreadsheetApp is a Google Apps Script service that provides programmatic access to Google Sheets. It enables scripts to create, open, modify, and manage spreadsheets and their contents from within the Apps Script environment. As a global object, SpreadsheetApp serves as the entry point to the Sheets service in Google Apps Script.

Common tasks include opening existing spreadsheets by ID or URL, creating new ones, and obtaining references

Once a Spreadsheet is obtained, operations can read or write data, format cells, set formulas, insert or

SpreadsheetApp runs on Google's servers as part of Apps Script and requires authorization to access the user's

See also: Google Apps Script, Google Sheets, Sheets API.

to
specific
sheets
and
ranges.
Typical
methods
include
openById(id),
openByUrl(url),
and
create(name).
From
a
Spreadsheet
object
returned
by
these
methods,
developers
can
access
sheets,
named
ranges,
protections,
and
other
features.
delete
sheets,
and
manage
data
validation
or
conditional
formatting.
For
example,
scripts
can
read
values
from
a
range,
write
values,
or
batch-update
multiple
cells.
The
Range,
Sheet,
and
other
classes
provide
methods
for
these
tasks.
Scripts
can
also
automate
repetitive
editing,
import
or
export
data,
and
respond
to
triggers
or
user
actions
within
Google
Sheets.
spreadsheets.
Scripts
may
run
on
triggers
or
be
executed
manually,
and
quotas
apply
to
API
calls
and
execution
time.
The
service
is
distinct
from
the
Sheets
API,
although
both
enable
programmatic
spreadsheet
work.