title: Populate data from a Google Form survey into new tab, using template
body: <p>I have a sheet with survey results from a Google Form (26 responses).  I have succeeded in getting the script to open a new tab with the name I specified from that survey tab.  But the new tab is currently blank, so how can I get it to import that row of data into that tab that it just made?  This is the script that is working, but I am not sure what/how to integrate the piece that tells it to import the row of data.</p>
  <pre><code>function wa13477102() {
  
    // set up the spreadsheet and establish the current sheet with a new tab named after the survey inquirer name
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getActiveSheet();
  
    // get the name of the current sheet - so that you don't accidentally try and name the new sheet with the same name.
    var oldName = sheet.getName();
  
    // get the values from Cell B2 and C2
    // Note for the date in Cell C2 we use &quot;getDisplayValue()&quot; for a WYSIWYG value.
  
    var myday = sheet.getRange(&quot;C2&quot;).getDisplayValue();
  
  
    // get the new name just by joining the two; there are lots of other ways to do this; you can search on Stackoverflow
    var newName = myday;
  
    // logic 
    // 1) if the length of the newname is grater than zero - that means there IS a value for newname; it's not just a blank.
    // AND
    // 2) the new name isn't the same as the old name.
    if (newName.toString().length &gt; 0 &amp;&amp; newName !== oldName) {
  
      // insert a new sheet and name it with your newname.
      ss.insertSheet(newName);
    }
  </code></pre>