title: Export excel file using PHPExcel
body: <p>I am working on a application and trying to export Excel file using PHPExcel, data was manipulated/generated by some javascript methods so it's not on server.I have methods to export CSV and PDF files but i am trying to get that data in Excel file in some custom format.
   Here is gist of few files:  <a href="https://gist.github.com/gupta2205/959be9a10dbe1857609f" rel="nofollow">https://gist.github.com/gupta2205/959be9a10dbe1857609f</a> </p>
  
  <p>I am curious what can i write in here </p>
  
  <pre><code>   public function export($Sets, $disp_filter)
       {
      $excel_out  = new PHPExcel();
      $excel_out-&gt;setActiveSheetIndex(0);
  
      var_dump($excel_out);
  
      $csv_out = $this-&gt;outputHumanReadableFilter($disp_filter);
      $csv_out []= array();
  
      $csv_out = array_merge($csv_out, $this-&gt;outputSampleDetails($Sets));
      $csv_out []= array();
  
      $csv_out = array_merge($csv_out, $this-&gt;outputQuestions($Sets));
  
      $fp = fopen('php://output', 'w');
      ob_start();
      $rowCount = 1;
      foreach ($csv_out as $line)
      {
          $colCount = 'A';
          $col_values = explode(',', $line);
          foreach($col_values as $col_value){
              $excel_out-&gt;getActiveSheet()-&gt;setCellValue($colCount.$rowCount, $col_value);
              $colCount++;
          }
          $rowCount++;
      }
  
      return $excel_out;
  
  }
  </code></pre>
  
  <p>How can i get the data in excel sheet ?
  Sorry it might be lil silly question but i'm new to PHP and PHPExcel. </p>