Currency Support

Topics: User Forum
Apr 5, 2009 at 8:49 AM
Edited Apr 5, 2009 at 8:50 AM
Currency support is limited to USD and Euro would it be possible to support GBP (£) as well?

Thanks very much
Apr 5, 2009 at 9:34 AM
You can define your own custom number format code. Example:


Just remember to save your script as UTF-8.

If you are unsure what the format code should look like you can in most cases just create a template xlsx file in MS Office Excel, then use PHPExcel to read of the format code. Alternatively, take your template xlsx file, change file extension to zip, unzip it, locate file xl/styles.xml, and look for the formatCode. Example of an entry for a number format code:

<numFmt numFmtId="164" formatCode="&quot;£&quot;#,##0.00_-"/>

Apr 5, 2009 at 10:25 AM
Thanks very much
Apr 5, 2009 at 10:46 AM
Coding is set to UTF-8 but I now get the following error
"EXcel found unreadable content in ....xlsx

The log shows "<removedPart>Removed Part: /xl/styles.xml part with XML error. (Styles) Illegal xml character. Line 5, column 44.</removedPart>" which is the £ sign
Apr 5, 2009 at 11:08 AM
Hmm... With that error I can hardly believe it is properly encoded in UTF-8.

Here is what it should look like in Notepad++

Apr 5, 2009 at 12:18 PM
Ooops Looked at it again and you are quiet right I was been thrown by the XML in the file! Now working fine

Thanks again