Home » File Formats » Spreadsheet_Excel_Writer » Bug #4329
setBgColor not working with setNumFormat?
Details
| Submitted | 2005-05-11 20:37 UTC |
|---|---|
| From | pear at adub dot com |
| Assigned | progi1984 |
| Status | Bogus |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 5.0.4 |
| OS | fedora core 3 |
| Roadmaps | (Not assigned) |
Comments
[2005-05-11 20:37 UTC] pear at adub dot com
Description:
------------
setBgColor seems to create a problem for formatting the cell content. See below.
Reproduce code:
---------------
$total =& $workbook->addFormat();
$total->setNumFormat('#,##0.00 "€";-#,##0.00 "€"');
$total->setBgColor('Gray'); // take this line out and all OK
$worksheet->writeFormula(31, 1, "=SUM(B27:B31)", $total);
Expected result:
----------------
cell B32 should sum the cells above it, be formatted and have a gray background.
Actual result:
--------------
It seems OK until values are entered into the cells above at which point the bg goes black. The cell's content format (Format->Cells) can't be accessed from Excel when setBgColor is set, regardless of whether setNumFormat is set.