Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9831

AppendRow Column Offset

$
0
0

I wrote a Google Sheets Apps Script to function as a data entry form for my team to use. The script works great, but I'm looking for a way to improve it. I'd like to be able to skip the first column in the sheet where the entry line gets dropped into ("Archive" sheet). So the data would get dropped starting in Column 2 instead of Column 1. How do I make the AppendRow offset over by one column in this way?

function Entry() {    var ui = SpreadsheetApp.getUi();    var result = ui.alert(  'Please only log this data when you have finished the brew',    ui.ButtonSet.YES_NO);      if(result == ui.Button.YES) {      var ss = SpreadsheetApp.getActive();        var ent = ss.getSheetByName("Form Entry");        var prev = ss.getSheetByName("Archive");        var copy = ent.getRange('I3:AZ3');        prev.appendRow(copy.getValues()[0]);        var rangelist = ent.getRangeList(['C4','C6:C13','B18:D27','B29']).clearContent();        return    } else {      return;    }      }

Viewing all articles
Browse latest Browse all 9831

Latest Images

Trending Articles



Latest Images