I am trying to build a code that will pull any text options from column B without any of the blank cells. I want to be able to add additional text items to the spreadsheet and have them appear in the dropdown without having to change the code. I also do not want any blank options when there the selection I have made in the code includes blank cells.
function doGet(e) {
var ss = SpreadsheetApp.openByUrl(url);
var ws = ss.getSheetByName("Options");
var list = ws.getRange(1,2,ws.getRange("A1").getDataRegion().getLastRow(),1).getValues();
Logger.log(list);