Large numbers in .xls cell

Topics: Developer Forum, User Forum
Jun 23, 2011 at 2:46 PM

HI ,

I have a problem getting large numbers displayed right in excel.

The thing is , I need to get some EAN-codes (13 digits) from a database and get them into excel.
I allreay tried several options but the numbers in my xls are always shown as 4,00332E+12

Can someone explain me how I can solve this issue, i'm very new at phpexcel...

 

Thanks in advance

 

Wim

Jun 23, 2011 at 2:52 PM

$objPHPExcel->getActiveSheet()->getStyle($cell)->getNumberFormat()->setFormatCode('0');

We use EANs too; this works for us.

Jul 22, 2011 at 5:23 AM

it seams not work.

901616000000000000 in excel is showed like 9.02E+17. Using above method, it is 9.01616E+17.

any problem?