Google-apps-script – Placing checkboxes in Google Sheets using Apps Script

checkboxgoogle sheetsgoogle-apps-script

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.

Best Answer

UPDATE(April 2019)

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.

Snippet:

SpreadsheetApp.getActive()
    .getRange('Sheet2!A2:A10')
    .insertCheckboxes();
Related Topic