distinguishing currencies while reading excel files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dancho413
Forum Newbie
Posts: 1
Joined: Thu May 13, 2010 7:01 am

distinguishing currencies while reading excel files

Post 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
Post Reply