Hi guys, I have a PHP application that uses the PEAR Spreadsheet_Excel_Writer package, and am having trouble with currency. Each row in the spreadsheet I'm trying to construct has a field representing a price in any one of a number of currencies. You guys don't need to know anything about PHP, but there is a step in there where I can set a number format encoding, for example "$##.###".
For me it's kind of difficult, because I need to be able to express any of the currencies of the world, and if I try simply replacing the $ in the string above with something else, say "₭", I wind up with garbage symbols in my cell.
So, is there something I can do with currency codes in the number format field? For example, let's say I want to format a custom currency field to use yen. I'd like to be able to do something like "##.#### JPY", and wind up with a cell that looks like "¥7500". I know that Excel knows how to handle currencies properly, putting the symbol on the right or left as needed, that sort of thing--I'd love to be able to take advantage of it.
Do you understand what I mean? Any ideas?
Thanks much!
Max
For me it's kind of difficult, because I need to be able to express any of the currencies of the world, and if I try simply replacing the $ in the string above with something else, say "₭", I wind up with garbage symbols in my cell.
So, is there something I can do with currency codes in the number format field? For example, let's say I want to format a custom currency field to use yen. I'd like to be able to do something like "##.#### JPY", and wind up with a cell that looks like "¥7500". I know that Excel knows how to handle currencies properly, putting the symbol on the right or left as needed, that sort of thing--I'd love to be able to take advantage of it.
Do you understand what I mean? Any ideas?
Thanks much!
Max
Last edited: