Page 1 of 1

distinguishing currencies while reading excel files

Posted: Thu May 13, 2010 7:29 am
by dancho413
Hi,

I am trying to read an .xls file using PHPexcel and PHPexcelreader.

Can someone please advise how to distinguish between currency formats in a certain cell? In particular i need to be able to distinguish USD ($), EUR, and BGN (Bulgarian leva - лв) currencies. I can easily recognize BGN currency with something like

Code: Select all

stripos($currency,'лв',0)
, but can't do the same for EUR and USD, because it seems they are pretty similar as format code.

I've also tried to get the formatted value of the cell (ex. $120.53), but still no luck - couldn't find a method that can do this on both classes.

Thanks in advance.

Dancho