title: Return row in loop with phpspreadsheet
body: <p>i have an excel sheet and i want to loop through just one single row only. Right now i got this:</p>
  
  <pre><code>$reader-&gt;setReadDataOnly(TRUE);
  $spreadsheet = $reader-&gt;load("KEVIN Call Monkey ALLE BEDRIJVEN 29-10-18 Export_bedrijven_20181030_105432.xlsx");
  
  $worksheet = $spreadsheet-&gt;getActiveSheet();
  
  
  foreach ($worksheet-&gt;getRowIterator() as $row) {
      $cellIterator = $row-&gt;getCellIterator();
      $cellIterator-&gt;setIterateOnlyExistingCells(FALSE); // This loops through all cells,
                                                         //    even if a cell value is not set.
                                                         // By default, only cells that have a value
                                                         //    set will be iterated.
      foreach ($cellIterator as $cell) {
          echo 
               $cell-&gt;getValue();
  
      }
  
  }
  </code></pre>
  
  <p>This is returning every single row. I just want one row to be displayed. In this case Row 'J'. </p>
  
  <p>Updated code:</p>
  
  <pre><code>require 'vendor/autoload.php';
  
  use PhpOffice\PhpSpreadsheet\Spreadsheet;
  use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
  use PhpOffice\PhpSpreadsheet\Reader\IReader;
  use \PhpOffice\PhpSpreadsheet\IOFactory;
  
  $inputFileName  =  'KEVIN Call Monkey ALLE BEDRIJVEN 29-10-18 Export_bedrijven_20181030_105432.xlsx';
  $inputFileType = 'Xlsx';
  /**  Create a new Reader of the type defined in $inputFileType  **/
  $reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
  /**  Load $inputFileName to a Spreadsheet Object  **/
  $spreadsheet = $reader-&gt;load($inputFileName);
  
  $worksheet = $spreadsheet-&gt;getActiveSheet();
  $rows = $worksheet-&gt;toArray();
  
  var_dump($rows);
  </code></pre>
  
  <p>I have this code, from one of the answers below. I still get a http error 500 in the browser. </p>