Home » File Formats » Spreadsheet_Excel_Writer » Bug #9062
Euro does not appear correctly in formula styles
Details
| Submitted | 2006-10-16 13:03 UTC |
|---|---|
| From | simon at elroble dot co dot uk |
| Assigned | progi1984 |
| Status | Closed |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 4.4.3 |
| OS | Apache Webserver | Windows XL |
| Roadmaps | (Not assigned) |
Comments
[2006-10-16 13:03 UTC] simon at elroble dot co dot uk
Description:
------------
I can add the euro symbol to a worksheet as text field with no problem but when i use the euro symbol as part of a number format in a style the euro is encoded incorrectly.
From past experience the Euro symobl may not appear correctly in this bug report,
setNumFormat("#,##0.00 ¤");
The character between the 0.00 and the close quote should be a euro symbol
Test script:
---------------
<?
include("Spreadsheet/Excel/Writer.php");
$workbook = new Spreadsheet_Excel_Writer();
$workbook->setVersion(8);
$worksheet =& $workbook->addWorksheet();
$worksheet->setInputEncoding('UTF-8');
$CurrencyStyle =& $workbook->addFormat();
$CurrencyStyle->setNumFormat("#,##0.00 ¤");
/** this one works ok when added as text */
$worksheet->write(0,0,"2.15 ¤");
/** because the euro is added as a format, it now fails */
$worksheet->write(1,1,"2.15",$CurrencyStyle);
$workbook->send('Euro.xls');
$workbook->close();
?>
Expected result:
----------------
Euro should display correctly in the sheet regardless if it is a format or a text.