title: using phpexcel in codeigniter
body: <p>i am using the phpexcel library to export my report to excel file.
  but i want to have my own excel file and use it with phpexcel.
  here is the code i used:</p>
  
  <pre><code>public function event_reportexcel($id)
  {
      $this-&gt;load-&gt;library('excel');
      $this-&gt;excel-&gt;setActiveSheetIndex(0);
      $this-&gt;excel-&gt;getActiveSheet()-&gt;setTitle('test worksheet');
      $this-&gt;excel-&gt;getActiveSheet()-&gt;setCellValue('A1', 'This is just some text value');
      $this-&gt;excel-&gt;getActiveSheet()-&gt;getStyle('A1')-&gt;getFont()-&gt;setSize(20);
      $this-&gt;excel-&gt;getActiveSheet()-&gt;getStyle('A1')-&gt;getFont()-&gt;setBold(true);
      $this-&gt;excel-&gt;getActiveSheet()-&gt;mergeCells('A1:D1');
      $this-&gt;excel-&gt;getActiveSheet()-&gt;getStyle('A1')-&gt;getAlignment()-&gt;setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
  
      $filename='just_some_random_name.xls'; //save our workbook as this file name
      header('Content-Type: application/vnd.ms-excel'); //mime type
      header('Content-Disposition: attachment;filename="'.$filename.'"'); //tell browser what's the file name
      header('Cache-Control: max-age=0'); //no cache
  
  
      $objWriter = PHPExcel_IOFactory::createWriter($this-&gt;excel, 'Excel5');  
      //force user to download the Excel file without writing it to server's HD
      $objWriter-&gt;save('php://output');
  }
  </code></pre>
  
  <p>it will put my data in a new excel file, but i need this function to use a excel file as template.</p>