使用 Apps 脚本在 Google 表格中放置复选框 [英] Placing checkboxes in Google Sheets using Apps Script
问题描述
我知道复选框是 Google 表格中相对较新的功能,因此我正在尝试找到一种方法来自动在单元格中创建复选框.
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.
到目前为止,我还没有在 Google Apps Script 文档中找到关于此的参考.
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.
推荐答案
更新(2019 年 4 月)
您现在可以在 Range
或 RangeList
没有任何解决方法.您还可以使用文档中的替代方法签名更改选中的值/未选中的值.
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.
SpreadsheetApp.getActive()
.getRange('Sheet2!A2:A10')
.insertCheckboxes();
这篇关于使用 Apps 脚本在 Google 表格中放置复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!