Home » File Formats » Spreadsheet_Excel_Writer » Bug #8175
Error in reference with the Excel ColorIndex colors
Details
| Submitted | 2006-07-10 18:40 UTC |
|---|---|
| From | guillaume at cybercat dot ca |
| Assigned | progi1984 |
| Status | Closed |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 5.1.4 |
| OS | N/A |
| Roadmaps | (Not assigned) |
Comments
[2006-07-10 18:40 UTC] guillaume at cybercat dot ca
Description:
------------
In the "Format::setFgColor" section of the documentation, there's a link pointing to:
http://www.mvps.org/dmcritchie/excel/colors.htm
The text following that link reads:
"Beware that the color indexes listed there are displaced by 1 with respect to those used by Spreadsheet_Excel_Writer."
I believe the color indexes are displaced by 7 (not by 1 as stated in the documentation).
Test script:
---------------
$foo =& $workbook->addformat();
$foo->setFgColor(22);
$worksheet->writeString(1, 1, 'FOOBAR', $foo);
Expected result:
----------------
I expect the background to be violet (color #21).
Actual result:
--------------
The background is Gray 25% (color #15).