title: Get specific rows from CSV file to googlesheet using Google Apps Script
body: <p>I have a CSV file uploaded to a Google Drive folder. Its column A has different names of people. Each name has its own google sheet. I need each name(their data) to be imported to their corresponding google sheet.</p>
  <p>If the source data is a google sheet, I can do it like this(see below). But, I have zero idea how to do it if my source data is a csv file:</p>
  <pre><code>function myFunction() {
    var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(&quot;Testname&quot;);
    var lr = ss.getLastRow();
    
    for (i=2; i&lt;=lr; i++) {
      var conditionRange = ss.getRange(i,1).getValue();
        if (conditionRange == &quot;John&quot;) {
          // All rows with John name will be imported to John's googlesheet
  </code></pre>
  <p><a href="https://i.stack.imgur.com/JT3ol.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JT3ol.png" alt="CSV File" /></a></p>