Currency Issue

Jul 5, 2012 at 7:58 AM

Hello people,

I am having an issue I cannot seem to fix. I would like to display prices in my excel sheet as follows:

€ 1,50

Now, what it is displaying, is:

€1,5

So I would like a space between the € and the price, and also ALWAYS display 2 numbers behind the comma. I am using this:

$currencyFormat = iconv("ISO-8859-1", "UTF-8", '€ #,##0.00');
$objPHPExcel->getActiveSheet()->getStyle('F3:F100')->getNumberFormat()->setFormatCode($currencyFormat);

Can someone point me in the right direction? Thanks a lot in advance!

~Hardist

Jul 10, 2012 at 8:16 AM

Anyone has any ideas?

Coordinator
Jul 10, 2012 at 2:37 PM

Try using an underscore rather than a space

$currencyFormat = iconv("ISO-8859-1", "UTF-8", '€_#,##0.00');