How to ignore empty cell values for getRange().getValues()

前端 未结 3 1766
野性不改
野性不改 2020-12-06 12:20

I am able to get the range values using getValues() and put it into a string by declaring the following variables in Google App Script

var ss = SpreadsheetAp         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 12:57

    You can also use filter().

    var ss = SpreadsheetApp.getActiveSpreadsheet(); 
    var sheet = ss.getSheetByName("Test"); 
    var range_input = ss.getRange("A1:A").getValues();
    var filtered_input = range_input.filter(String);
    

提交回复
热议问题