title: Why I can't set value from the database but hard coded values works fine?
body: <p>I am using this code to set cellvalue from database but it does not work.</p>
  
  <pre><code>$excel2 = PHPExcel_IOFactory::createReader('Excel2007');
  $excel2 = $excel2-&gt;load("test.xlsx"); // Empty Sheet
  
  
  $excel2-&gt;getActiveSheet()-&gt;setCellValue('A1', 'Date');
  
  $m=2;
  $result=mysqli_query($con,"select * from settings");
  
  while($row=mysqli_fetch_array($result))
  {
    $chan=$row['channelID'];
              $excel2-&gt;getActiveSheet()-&gt;setCellValue("C$m", $chan);
  echo $chan;
  echo "&lt;br&gt;";
  $m++;
  }
  </code></pre>
  
  <p>But when I change this line to static text it works fine</p>
  
  <pre><code>$excel2-&gt;getActiveSheet()-&gt;setCellValue("C$m", "static text");
  </code></pre>
  
  <p>I don't know where I am doing wrong I want to set value from the database any help would be appreciated.</p>