title: read csv file with wordpress
body: <p>How to read a csv file with wordpress, i tried the code below but it's not working:</p>
  
  <pre><code>     require_once("PHPexcel/PHPExcel.php");
       $file = "sample.csv"; 
       $excelReader = PHPExcel_IOFactory::createReaderForFile($file);
       $excelObj = $excelReader-&gt;load($file);
       $workSheet = $excelObj-&gt;getSheet(0);
       $lastRow = $workSheet-&gt;getHighestRow();
  
       for ($row=2; $row &lt;=$lastRow ; $row++) { 
          $col1 = $workSheet-&gt;getCell('A'.$row)-&gt;getValue();
          var_dump($col1);
       }
  </code></pre>
  
  <p>I tried this in separated php file and it works, but when i put it in wordpress, it's not working anymore and i got an error: 
  Fatal error: Uncaught PHPExcel_Reader_Exception: Could not open sample.csv for reading! File does not exist.</p>