Insert Data Validation using Google Apps Script


I'm trying to insert an in cell dropdown menu (Data > Validation > List of Items) in a Gsheet using Google Apps Script. I want to do this because every time I use the spreadsheet the 'list of items' will change slightly and I don't wanna have to go to "Data > Validation > List of Items" every time I open the spreadsheet.

I'm aware that "Data > Validation > List from a Range" exists but I'd rather not use it.


An Apps Script API for data validation was just released: <a href="http://googleappsdeveloper.blogspot.com/2013/08/answering-another-top-request-data.html" rel="nofollow">http://googleappsdeveloper.blogspot.com/2013/08/answering-another-top-request-data.html</a>

Related references:

<ul><li><a href="https://stackoverflow.com/questions/17515902/drop-down-validation-list-created-dynamically-google-apps-script" rel="nofollow">Drop-down validation list created dynamically (google apps script)</a></li> <li><a href="https://code.google.com/p/google-apps-script-issues/issues/detail?id=2958" rel="nofollow">https://code.google.com/p/google-apps-script-issues/issues/detail?id=2958</a></li> <li><a href="https://code.google.com/p/google-apps-script-issues/issues/detail?id=219" rel="nofollow">https://code.google.com/p/google-apps-script-issues/issues/detail?id=219</a></li> </ul>


  • Create a Google Form in Pop up of Google Spreadsheet. Could this be done?
  • Why do i get infinite loop
  • How do you make a dynamically-sized data table?
  • call system text editor
  • Is there a way to call library thread-local init/cleanup on thread creation/destruction?
  • Classic ASP URL Rewriting
  • Efficient User-Agent Regex to find Safari in Python
  • Cypher - matching two different possible paths and return both
  • OSX - always hide certain files
  • ListItem.Attributes.Add not working
  • Tamper-proof configuration files in .NET?
  • Excel's Macro-Recorder usage
  • DomPDF {PAGE_NUM} not on first page
  • Javascript simulate pressing enter in input box
  • Java applet as stand-alone Windows application?
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • Does CUDA 5 support STL or THRUST inside the device code?
  • WinForms: two way TextBox problem
  • How to handle AllServersUnavailable Exception
  • Can I make an Android app that runs a web view in Chrome 39?
  • Importing jscolor library in angular 2
  • VBA Convert delimiter text file to Excel
  • Calling of Constructors in a Java
  • php design question - will a Helper help here?
  • Traverse Array and Display in markup
  • Transpose CSV data with awk (pivot transformation)
  • A cron job substitute?
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • how does django model after text[] in postgresql [duplicate]
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • Turn off referential integrity in Derby? is it possible?
  • LevelDB C iterator
  • Linking SubReports Without LinkChild/LinkMaster
  • How can I remove ASP.NET Designer.cs files?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Add sale price programmatically to product variations
  • Reading document lines to the user (python)
  • Unable to use reactive element in my shiny app
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize
  • How do I use LINQ to get all the Items that have a particular SubItem?