title: Codeigniter + PHPExcel Library Issue
body: <p>I am using <strong>PHPExcel</strong> library as shown <a href="http://www.ahowto.net/php/easily-integrateload-phpexcel-into-codeigniter-framework/" rel="nofollow">here</a>. But, tt's not working as expected. When I searched, someone has suggested replacing <code>PHPEXcel_IOFactory</code> to <code>IOFactory</code>. It downloads the file, but it couldn't be opened. Any suggestions?</p>
  
  <p>Here is my library code:</p>
  
  <p><strong>Excel.php</strong></p>
  
  <pre><code>require_once APPPATH.'/third_party/PHPExcel.php';
  class Excel extends PHPExcel
  {
      public function __construct()
      {
          parent::__construct();
      }
  }
  </code></pre>
  
  <p>Here is the controller code:</p>
  
  <pre><code>        #load our new PHPExcel library
          $this-&gt;load-&gt;library('excel');
  
          $data = $this-&gt;report_model-&gt;get_all_report_product_info();
          $filename = "Output";
  
          # Set the active Excel worksheet to sheet 0 
          $this-&gt;excel-&gt;setActiveSheetIndex(0);
  
          $row_count = 2;
          foreach ($data as $row) {
              $this-&gt;excel-&gt;getActiveSheet()-&gt;setCellValue('A' . $row_count, $row-&gt;product_name);
              $this-&gt;excel-&gt;getActiveSheet()-&gt;setCellValue('B' . $row_count, $row-&gt;product_sku);
              $this-&gt;excel-&gt;getActiveSheet()-&gt;setCellValue('C' . $row_count, $row-&gt;customer_name);
              $this-&gt;excel-&gt;getActiveSheet()-&gt;setCellValue('D' . $row_count, $row-&gt;site_url);
              $row_count++;
          }
  
          header('Content-Type: application/vnd.ms-excel');
          header('Content-Disposition: attachment;filename="' . $filename . '.xlsx"');
          header('Cache-Control: max-age=0');
  
          // Instantiate a Writer to create an OfficeOpenXML Excel .xlsx file
          $objWriter = IOFactory::createWriter($this-&gt;excel, 'Excel5');
  
          // Write the Excel file to filename
          $objWriter-&gt;save('php://output');
  </code></pre>