title: Get data next to eachother
body: <p>I've made a script for sending bulk emails from google sheet.
  However I stumbled across a problem.
  For some reason I'm not able to get the data below next to each other.</p>
  
  <pre><code>var open = row[1] + row[2] + row[3]
  </code></pre>
  
  <p>Beneath you will find a piece of the google sheet list.
  I use a vlookup on ID number to insert that data next to the message of the pupil/mail adress.</p>
  
  <p><img src="https://i.stack.imgur.com/b0HaU.png" alt=""></p>
  
  <p>In my message I have an introduction (hello pupil, etc.)
  After, they get (or should get) a list of their points.</p>
  
  <pre><code>var message = introduction + '\n\n' + open  + '\n\n\n' + ending; // setup of the mail
  </code></pre>
  
  <p>However, when they receive the mail it looks like this</p>
  
  <pre><code>Sarah
  Sarah
  Chemistry
  Maths
  9,5
  6,0
  </code></pre>
  
  <p>Is there a way to get this data next to each?
  like <code>\n</code> for new paragraph.</p>
  
  <p>Thanks in advance</p>
  
  <p>Edit:
  It should look like this.</p>
  
  <pre><code>Sarah     Maths         9,5
  Sarah     Chemistry     6,0
  </code></pre>
  
  <p>Edit2:</p>
  
  <p>Macro i use to merge columns</p>
  
  <pre><code>function merge_col() {
    var ss = SpreadsheetApp.getActive().getSheetByName('Open invoices');
    var data = ss.getDataRange().getValues();
    var header = data.shift();
    var col1 = data[1][0];
    var col2 = '';
    var col3 = '';
    var col4 = '';
    var dataSheet2 = [header];
    for(var i=0 ; i&lt;data.length ; i++){
      Logger.log(data[i][0]+'  -  '+col1+'  -  '+data[i][2])
      if(col1==data[i][0]){
        col1 = data[i][0];
        col2+=data[i][1]+'\n';
        col3+=data[i][2]+'\n';
        col4+=data[i][3]+'\n';
      }else{
        dataSheet2.push([col1,col2,col3,col4]); 
        var col1 = data[i][0];
        col2 = data[i][1]+'\n';
        col3 = data[i][2]+'\n';
        col4 = data[i][3]+'\n';
      }
    }
    dataSheet2.push([col1,col2,col3,col4]); 
    Logger.log(dataSheet2);
    var sheet2 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet3');
    sheet2.clear();
    sheet2.getRange(1, 1, dataSheet2.length, dataSheet2[0].length).setValues(dataSheet2);
  }
  </code></pre>