title: Reading a XLSX sheet to feed a MySQL table using PHPExcel
body: <p>I found the PHPExcel library brilliant to manipulate Excel files with PHP (read, write, and so on).</p>
  
  <p>But nowhere in the documentation is explained <strong>how to read a XLSX worksheet to feed a MySQL table</strong>...</p>
  
  <p>Sorry for this silly question, but i need it for my work and found no answer on the web.</p>
  
  <p>A small example could be very helpful.</p>
  
  <p>Thanks a lot.</p>
  
  <p><strong>UPDATED :</strong></p>
  
  <p>I precise my question :</p>
  
  <p>The only part of code i found in the documentation that could help me is to read an Excel file and display it in a HTML table :</p>
  
  <pre><code>`require_once 'phpexcel/Classes/PHPExcel.php';
  $objReader = PHPExcel_IOFactory::createReader('Excel2007');
  $objReader-&gt;setReadDataOnly(true);
  
  $objPHPExcel = $objReader-&gt;load("edf/equipement.xlsx");
  $objWorksheet = $objPHPExcel-&gt;getActiveSheet();
  
  $highestRow = $objWorksheet-&gt;getHighestRow(); 
  $highestColumn = $objWorksheet-&gt;getHighestColumn(); 
  
  $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); 
  
  echo '&lt;table border="1"&gt;' . "\n";
  for ($row = 1; $row &lt;= $highestRow; ++$row) {
    echo '&lt;tr&gt;' . "\n";
  
    for ($col = 0; $col &lt;= $highestColumnIndex; ++$col) {
      echo '&lt;td&gt;' . $objWorksheet-&gt;getCellByColumnAndRow($col, $row)-&gt;getValue() . '&lt;/td&gt;' . "\n";
    }
  
    echo '&lt;/tr&gt;' . "\n";
  }
  echo '&lt;/table&gt;' . "\n";`
  </code></pre>
  
  <p>I know i can use the loop to feed my MySQL table, but i don't know how... I'm not aware in OOP...</p>
  
  <p>Can somebody help me, please ?</p>