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

πŸ“ Want the finished tool? Local Lead Finder searches every part of a cit...

Related blog posts

Guides that explain ThisWorkbook in more depth.

Browse the blog

Related terms

Ads keep the free stuff free. Members browse ad-free — log in or see pricing.
Big Year 2027 calendar: the whole year on one Google Sheet

Free 2027 calendar.Plan all of 2027 on one Google Sheet, free.

Copy it to your Google Drive.

Free. No password, no card. The sheet link shows up right here.