What replaces ThisWorkbook in Google Sheets?

When to use it

Use getActiveSpreadsheet when porting ThisWorkbook events or properties to a bound script.

When to skip it

Skip workbook object code when a single formula or IMPORTRANGE already reads the other file.

Related Tutorials

Watch how ThisWorkbook works

Watch more tutorials
MAKE Your Google Sheets Add-on WORK

MAKE Your Google Sheets Add-on WORK

In this section of the Add-on course we'll be making the apps script wor...
The First Thing I Do When Starting a Google Sheet

The First Thing I Do When Starting a Google Sheet

Are you tired of the default look of your Google Sheets? In this video, ...
5 Ways To Use Google Sheets for Advanced Project Management

5 Ways To Use Google Sheets for Advanced Project Management

Here are 5 advanced ways to manage projects inside of Google Sheets Man...
Convert Google Sheets into a REST API

Convert Google Sheets into a REST API

How to use Google Sheets as a database by turning it into a REST API wit...
Get Every Editor on Every Google File I Own

Get Every Editor on Every Google File I Own

Get every editor if you're looking for the sheets and documents you've s...
Scrape Google Maps

Scrape Google Maps

Scrape any query in Google Maps into your Google Sheets. Enter your API ...

Related blog posts

Guides that explain ThisWorkbook in more depth.

Browse the blog

Related terms