Problem / bug with setFormatCode

Topics: Developer Forum, User Forum
Sep 5, 2011 at 12:21 PM

Having a problem with the setFormatCode. 
I'm trying to format a number like this : xx xxx xxx,xx €

For this, i'm using setFormatCode with the folowing parameter : 
'# ##0.00 €;;'

The problem is that when i'm in Excel, the number appear like this : xxxxx xxx,xx €

When looking the format cell in Excel, the format is #\ ##0.00 €;


Here is a part of my code : 

...
ini_set('mbstring.internal_encoding', 'ISO-8859-1');
$objPHPExcel = PHPExcel_IOFactory::load("LINKTOTEMPLATE");
...
$objPHPExcel->setActiveSheetIndex(0)->getStyle('C4:C'.$i)->getNumberFormat()->setFormatCode('# ##0.00 €;;');
...
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save($_SERVER['DOCUMENT_ROOT'].$files_src);

I think that is a bug of PHPExcel.
If not sorry, but I don't see where i've done a mistake !

Sep 6, 2011 at 12:50 PM

Any body ?

I would really appreciate your help.

 

Thank you.

Sep 9, 2011 at 9:35 AM

I'm still having this problem ! 

Any idea how to resolve this problem/bug ?

 

Thank's.

Sep 15, 2011 at 7:46 AM

Check out this discussion for a solution

http://phpexcel.codeplex.com/discussions/272552