Bug #3185 [Fbk->Opn]: Bug in setBgColor() Example

From: Date: Thu, 13 Jan 2005 20:09:39 +0000
Subject: Bug #3185 [Fbk->Opn]: Bug in setBgColor() Example
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5425@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 User updated by: tim at gerundt dot de Reported By: tim at gerundt dot de -Status: Feedback +Status: Open Type: Bug Package: Documentation PHP Version: Irrelevant New Comment: 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) Previous Comments: ------------------------------------------------------------------------ [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 (#5425) next »