I know that checkbox is a relatively new feature in Google Sheets, so I'm trying to find a way to automatically create checkboxes in cells.
So far, I haven't found a reference regarding this in Google Apps Script documentation.
Currently I'm doing it manually, but any suggestion using script will be much appreciated.
Add custom values in checkboxes In Sheets, select the cells you want to have checkboxes. Data validation. Next to Criteria, choose Checkbox. Select the Use custom cell values box.
Select All Checkboxes With Spacebar Highlight a range of checkboxes. Press the spacebar to toggle them checked or unchecked.
You can now directly insertCheckboxes
(or removeCheckboxes
) on a Range
or RangeList
without any workarounds. You can also change the checked value/unchecked value using alternate method signatures found in the documentation.
SpreadsheetApp.getActive()
.getRange('Sheet2!A2:A10')
.insertCheckboxes();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With