Re: Spreadsheet_Excel_Writer color problem
| From: | Matt Matijevich | Date: | Tue, 06 Apr 2004 18:17:29 +0000 |
| Subject: | Re: Spreadsheet_Excel_Writer color problem | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11677@lists.php.net to get a copy of this message | ||
[snip]
I'm not sure which is messed up, Spreadsheet_Excel_Writer or the Excel
format but what you want to set is the foreground color.
just switch setBgColor with setFGColor.
In my code im also setting pattern, i don't actually remember if thats
needed.
-josh
$data['odd'] =& $workbook->addFormat();
$data['odd']->setNumFormat(1);
$data['odd']->setFgColor(22);
$data['odd']->_pattern = 2;
[/snip]
many thanks. That worked.