title: Printing Unspecified Number of Array Contents in Google Sheets Cells (GAS)
body: <p>I am collecting information from a database, based on a filter and is stored in an array of arrays. Once this information is collected I want to be able to print this data onto a new sheet like this:</p>
  <pre><code>___________________________________  
  |*****|John Buck, Associate, Luxura|
  ------------------------------------
  |*****|Jane Doe, Manager, Eclipse  |
  ------------------------------------
  |*****|Jim Bob, Executive, Lokia   |
  ------------------------------------
  |*****|Suzzy Sue, Director, RoomX  |
  ___________________________________
  </code></pre>
  <p>The most important part is that each time I run this function the array may be a different size, so I need it to continue through the array until all records have been printed down the sheet. I've tried a few things, but I am only used to using forEach or for loops when there is a condition, where as this one would just print the specified info in every array.</p>
  <pre><code>function testArray() {
    var activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet();
    var activeSheet = activeSpreadsheet.getActiveSheet();
    var activeRange = activeSpreadsheet.getActiveRange();
    var activeCell = activeSpreadsheet.getActiveCell();
  
    var startCell = activeSheet.getRange(5, 4);
    var ratingStartCell = activeSheet.getRange(5, 3);
  
    var newArray = [
      [&quot;John Buck&quot;, &quot;*****&quot;, &quot;Associate&quot;, &quot;Luxura&quot;][
        (&quot;Jane Doe&quot;, &quot;****&quot;, &quot;Manager&quot;, &quot;Eclipse&quot;)
      ][(&quot;Jim Bob&quot;, &quot;***&quot;, &quot;Executive&quot;, &quot;lokia&quot;)][
        (&quot;Suzzy Sue&quot;, &quot;*****&quot;, &quot;Director&quot;, &quot;RoomX&quot;)
      ],
    ];
  
    newArray.forEach((r, o) =&gt; {
      startCell.setValues(
        newArray[r][0] +
          &quot;, &quot; +
          newArray[r][2] +
          &quot;, &quot; +
          newArray[r][3] +
          &quot;, &quot; +
          newArray[r][4]
      );
    });
  
    newArray.forEach((r, o) =&gt; {
      ratingStartCell.setValues(newArray[r][2]);
    });
  }
  </code></pre>