title: set comma separated number in phpexcel with number_format() function in PHP
body: <p>I am generating Excel using PHPExcel.</p>
  
  <p>All code working fine. But comma separated number with <code>number_format()</code> function is not working properly.</p>
  
  <p>When i use below code it is working properly.</p>
  
  <pre><code>$val=round($data);
  $objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('J'.$rowCount,$val);
  $objPHPExcel-&gt;getActiveSheet()-&gt;getStyle('J'.$rowCount)-&gt;getNumberFormat()-&gt;setFormatCode("#,##0");
  </code></pre>
  
  <p>But when i use </p>
  
  <pre><code>$val=number_format($data);
  </code></pre>
  
  <p>I am not getting proper output. In excel ,cell value is proper (6,000) but input line it displayed</p>
  
  <blockquote>
    <p>'6,000</p>
  </blockquote>
  
  <p>So can't do autosum.</p>
  
  <p>I don't want to use <code>round()</code> function, because i am generating pdf ,csv also and i have common function to get values.</p>
  
  <p>Thanks</p>