简体   繁体   中英

Can we insert textbox/button in Google Spreadsheet without using any Google Form like Excel insert objects?

As we can insert any form objects in excel, like sameway in a sheet of google spreadsheet Can we insert textbox/button date picker. Or We should go with Google Forms for that.

Please confirm anyone. It would be great.

Thanks in advance

You can create an apps script and put a trigger to call it whe the user opens the spreadsheet. Here is an example of apps script

function onOpen() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet();
  var app = UiApp.createApplication();
  var form = app.createFormPanel();
  var flow = app.createFlowPanel();
  flow.add(app.createTextBox().setName("textBox"));
  flow.add(app.createListBox().setName("listBox").addItem("option 1").addItem("option 2"));
  flow.add(app.createSubmitButton("Submit"));
  form.add(flow);
  app.add(form);
 sheet.show(app);
};

The spreadsheet is shared here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM