title: Google APP Script to Download TEXT file from Spreadsheet
body: <p>The following Google Script code fetch the range of data from Google Spread sheet and download as file using the following command, The content of the file (<strong>text.txt</strong>) is in continuous format without delimeter or New line character at end of every Row  </p>
  
  <p>But I need to print the data with multiple lines as in the Google Spread sheet, How to go about this, I tried JASON.stringfy, I am unable to success </p>
  
  <pre><code>var cell_range_row = sheet.getRange(1,1).getValue();
  var range =sheet.getRange(1,1,cell_range_row,cell_range_column); 
  
  var values = range.getValues(); 
  var output = ContentService.createTextOutput();
  var txtFileName = 'test.txt';
  
  output.setMimeType(ContentService.MimeType.TEXT);
  output.setContent(values);
  output.downloadAsFile(txtFileName);
  
  return output;
  </code></pre>