title: Not getting any values in downloadable excel file generated using PHPexcel plugin
body: <p>I am trying to use PHPexcel plugin to generate downloadable excel file from mysql data. Unfortunately, I am only getting only the column headers and not their values in the downloaded excel file</p>
  
  <p>Where am I going wrong ? Also, I would like unicode characters to show properly.
  Following is my code of the downloadexcel.php file -</p>
  
  <pre><code>&lt;?php
  require_once 'Classes/PHPExcel.php';
  require_once 'Classes/PHPExcel/Writer/Excel2007.php';
  
  $objPHPExcel = new PHPExcel();
  
  $data=array();
  
  $sql="SELECT s.t_id,s.t_text,p.user_name,p.description,s.time,p.place from t 
  AS s INNER JOIN users AS p ON s.user_name=p.user_name order by s.time desc";
   $result = mysqli_query($con,$sql);
  
  while($row = mysqli_fetch_array($result))   {
      $array=array("T Link" =&gt; $row[0],"T"=&gt;$row[1] , "User Name" =&gt; $row[2] , 
  "User Profile" =&gt; $row[3], "Time" =&gt; $row[4] , "Place" =&gt; $row[5]);
       array_push($data,$array);
    }
  
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('A1', 'T Link');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B1', 'T');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('C1', 'User Name');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('D1', 'User Profile');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('E1', 'Time');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('F1', 'Place');
  
  $row=2;
  foreach($data as $row-&gt;$value) {
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('A'.$row,$value-&gt;t_id);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B'.$row,$value-&gt;t_text);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('C'.$row,$value-&gt;user_name);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('D'.$row,$value-&gt;description);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('E'.$row,$value-&gt;time);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('F'.$row,$value-&gt;place);
      $row++;
  }
  header('Content-Type: application/vnd.openxmlformats-
  officedocument.spreadsheetml.sheet');
  header('Content-Disposition: attachment;filename="helloworld.xlsx"');
  header('Cache-Control: max-age=0');
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
  $objWriter-&gt;save('php://output');
  ?&gt;
  </code></pre>
  
  <p>Based on comments of Mark Baker, edited the code but still not getting any result. This is my <strong>edited code</strong> -</p>
  
  <pre><code>&lt;?php
  require_once 'Classes/PHPExcel.php';
  require_once 'Classes/PHPExcel/Writer/Excel2007.php';
  
  $objPHPExcel = new PHPExcel();
  
  $data=array();
  
  $sql="SELECT s.t_id,s.t_text,p.user_name,p.description,s.time,p.place from t 
  AS s INNER JOIN users AS p ON s.user_name=p.user_name order by s.time desc";
   $result = mysqli_query($con,$sql);
  
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('A1', 'T Link');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B1', 'T');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('C1', 'User Name');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('D1', 'User Profile');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('E1', 'Time');
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('F1', 'Place');
  
  while ($row = mysqli_fetch_array($result))
        {
  $n=2;
  foreach($data as $row) {
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('A'.$n,$row['t_id']);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('B'.$n,$row['t_text']);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('C'.$n,$row['user_name']);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('D'.$n,$row['description']);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('E'.$n,$row['time']);
  $objPHPExcel-&gt;getActiveSheet()-&gt;setCellValue('F'.$n,$row['place']);
      $n++;
     }
  }
  header('Content-Type: application/vnd.openxmlformats-
  officedocument.spreadsheetml.sheet');
  header('Content-Disposition: attachment;filename="helloworld.xlsx"');
  header('Cache-Control: max-age=0');
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
  $objWriter-&gt;save('php://output');
  ?&gt;
  </code></pre>