title: Why isn't the function submitData adding the fields to the specified sheet?
body: <p>I am totally new at this. I saw a script for data input without forms. I followed the script suggested elsewhere but it's not updating the values in the specified sheet. Can formatting in the datasheet be the problem? should i attach the file?</p>
  
  <pre><code>    function submitData() {
    var ss        = SpreadsheetApp.getActiveSpreadsheet();
    var formSS    = ss.getSheetByName("New Data"); //Data Entry Sheet
    var datasheet = ss.getSheetByName("Business Info"); //Business Info Data Sheet
  
    //Input Values
    var values = [[formSS.getRange("B3").getValue(),
                   formSS.getRange("B4").getValue(),
                   formSS.getRange("B5").getValue(),
                   formSS.getRange("B6").getValue(),
                   formSS.getRange("B7").getValue(),
                   formSS.getRange("B8").getValue(),
                   formSS.getRange("B9").getValue(),
                   formSS.getRange("B10").getValue(),
                   formSS.getRange("B11").getValue(),
                   formSS.getRange("B13").getValue(),
                   formSS.getRange("B14").getValue(),
                   formSS.getRange("B15").getValue(),
                   formSS.getRange("B16").getValue(),
                   formSS.getRange("B17").getValue(),
                   formSS.getRange("B18").getValue(),
                   formSS.getRange("B19").getValue(),
                   formSS.getRange("B20").getValue(),
                   formSS.getRange("B21").getValue(),
                   formSS.getRange("B23").getValue(),
                   formSS.getRange("B24").getValue(),
                   formSS.getRange("B25").getValue(),
                   formSS.getRange("B26").getValue(),
                   formSS.getRange("B27").getValue(),
                   formSS.getRange("B28").getValue(),
                   formSS.getRange("B29").getValue(),
                   formSS.getRange("B30").getValue(),
                   formSS.getRange("B31").getValue(),]];
  
    datasheet.getRange(datasheet.getLastRow()+1, 1, 1, 27).setValues(values);
  
  }
  
  function clear1() {
    var sheet = SpreadsheetApp.getActive().getSheetByName("New Data");
    var rangesToClear = ["B3","B4","B5","B6","B7","B8","B9","B10","B11","B13","B14","B15","B16","B17","B18","B19","B20","B21","B23","B24","B25","B26","B27","B28","B29","B30","B31"];            
    for (var i=0; i&lt;rangesToClear.length; i++) { 
      sheet.getRange(rangesToClear[i]).clearContent();
    }
  }
  
  function onEdit(e) {
    e.source.setActiveSelection(e.range.offset(1, 0));
  }
  
  </code></pre>