Google Sheets: Checklist Template with Reset Button

1. Checkbox reset

function ResetCheckboxesOnSheet() {
var ss=SpreadsheetApp.getActive();
var sh=ss.getActiveSheet();
var rg=sh.getDataRange();
var vA=rg.getDataValidations();
var cbA=[];
for(var i=0;i<vA.length;i++) {
for(var j=0;j<vA[i].length;j++) {
var rule=vA[i][j];
if(rule!=null) {
var criteria = rule.getCriteriaType();
if(criteria == SpreadsheetApp.DataValidationCriteria.CHECKBOX) {
sh.getRange(i+1,j+1).setValue(false)
}
}
}
}
}

2. Add button

3. sources

Infrastructure Support Engineer/Technical Writer (Snowplow Analytics) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Endless Background With Tiling Sprite In PixiJS v5

How to run background worker processes in an Electron App

The grand promises of the online MOOC

10 things I never know before today about JavaScript

Electron Auto-Updater via Renderer (Frontend) Manipulation

Decoupling Software Design Patterns commonly used with React

JavaScript basics and functions

How to make SEO friendly URL using Javascript and Static Site Generators

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavol Kutaj

Pavol Kutaj

Infrastructure Support Engineer/Technical Writer (Snowplow Analytics) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com

More from Medium

How to set up VS code with Github

Problems with Python on MacOS

Top VS Code plugins for beginners.

Configure VS code with Conda