Bug #3185 [Asn->Csd]: Bug in setBgColor() Example

From: Date: Fri, 14 Jan 2005 01:02:29 +0000
Subject: Bug #3185 [Asn->Csd]: Bug in setBgColor() Example
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5430@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=3185&edit=1 ID: 3185 Updated by: ohill@php.net Reported By: tim at gerundt dot de -Status: Assigned +Status: Closed Type: Bug Package: Documentation PHP Version: Irrelevant Assigned To: ohill New Comment: This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. Previous Comments: ------------------------------------------------------------------------ [2005-01-13 19:43:11] ohill at php dot net I'll take care of this Dan. If I remember correctly, I have experienced the bug a while ago. I'll check and fix the example shortly. ------------------------------------------------------------------------ [2005-01-13 15:09:39] tim at gerundt dot de Sorry, i totally forgot to say the package name: "Spreadsheet_Excel_Writer" The example from "Format::setBgColor" has small bug. http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setbgcolor.php The example want to change the background color from 3 rows, but it change always the color from row 1. Because i don't know where i found the PEAR Manual source, i just copy the example and make a diff. Only to *show* the bug. Tim (sorry again for the poor informations) ------------------------------------------------------------------------ [2005-01-13 13:53:11] danielc at analysisandsolutions dot com How about some context, please. Exactly which file did you edit? A hyperlink to the page would be helpful, for example. ------------------------------------------------------------------------ [2005-01-13 08:34:43] tim at gerundt dot de Description: ------------ The example from setBgColor() want to show the backgroundcolor in three rows. But the source code write all to row 1. Reproduce code: --------------- --- C:\Temp\example.php.org Thu Jan 13 14:22:05 2005 +++ C:\Temp\example.php Thu Jan 13 14:22:58 2005 @@ -20,14 +20,14 @@ $another_format2 =& $workbook->addFormat(); $another_format2->setFgColor('red'); $another_format2->setPattern($i); - $worksheet->write(1, $i, "another pattern", $another_format2); + $worksheet->write(2, $i, "another pattern", $another_format2); // mixed red and green according to pattern $another_format3 =& $workbook->addFormat(); $another_format3->setBgColor('green'); $another_format3->setFgColor('red'); $another_format3->setPattern($i); - $worksheet->write(1, $i, "another pattern", $another_format3); + $worksheet->write(3, $i, "another pattern", $another_format3); } $workbook->close(); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=3185&edit=1

« previous php.pear.doc (#5430) next »