title: Error reading Excel file using Spout
body: <p>I am having trouble using the <strong>spout</strong> library in kohana 3.2 to import a big Excel file into mysql. These are the installation steps I have taken:</p>
  
  <p>In the portal file index.php, I added this line of code:</p>
  
  <pre><code>require_once APPPATH.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'kohana'.DIRECTORY_SEPARATOR.'Spout'.DIRECTORY_SEPARATOR."Autoloader/autoload.php";
  </code></pre>
  
  <p>This is my <code>reader</code> method:</p>
  
  <pre><code>public static function reader($filename){
  
      $result = array();
  
      $reader = ReaderFactory::create(Type::XLSX);
      $reader-&gt;open($filename);
  
  
      while ($reader-&gt;hasNextRow()) {
          $row = $reader-&gt;nextRow();
          $code = $row[1];
          $result[] = $code;
      }
  
      return $result;
  }
  </code></pre>
  
  <p>When I try calling the method, this error message appears:</p>
  
  <pre><code>ERROR: ErrorException [ 1 ]: Class 'ReaderFactory' not found ~ APPPATH/classes/kohana/spoutexcel.php [ 70 ]
  2015-09-25 14:29:10 --- STRACE: ErrorException [ 1 ]: Class 'ReaderFactory' not found ~ APPPATH/classes/kohana/spoutexcel.php [ 70 ]
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Spout can be found here: <a href="https://github.com/box/spout" rel="nofollow">https://github.com/box/spout</a></p>