Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
add dropdown list in google sheet by using app script

I try to add some names from array to list dropdown not work.

This is my code:

function dataDrpdwon() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var item = ss.addListItem();
    item.setTitle('Do you prefer cats or dogs?')
    .setChoices([
    item.createChoice('Cats'),
    item.createChoice('Dogs')
]);

}

after add =dataDrpdwon() in any cell I see this error TypeError: ss.addListItem is not a function (line 3). any help to fix.

I want to add =dataDrpdwon() in any cell and see List dropdown.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

addListItem is a function in ListItem Class. Here documentation https://developers.google.com/apps-script/reference/forms/list-item

about 4 years ago · Juan Pablo Isaza Report

0

addListItem is not available for on the ActiveSpreadsheet object, I think it's only available for Forms.

I'm not overly familiar with App Script, but drop downs within Sheets/Excel are typically done via validation. So you may need a different approach. A quick search found this that might put you in the right direction.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!