cra*_*ice 0 google-sheets google-apps-script
有没有办法通过Apps脚本在电子表格单元格中插入"显示单元格按钮以显示列表",即使用Data>>Data Validation电子表格菜单插入下拉列表(无需编程)?我需要在单元格中显示下拉列表(而不是在Uiapp中).
我认为我的问题的答案在这里:
// Set the data validation for cell A1 to require "Yes" or "No", with no dropdown menu.
var cell = SpreadsheetApp.getActive().getRange('A1');
var rule = SpreadsheetApp.newDataValidation().requireValueInList(['Yes', 'No'], false).build();
cell.setDataValidation(rule);
Run Code Online (Sandbox Code Playgroud)