Bug #4292 [NEW]: setPattern sample code is misleading
| From: | davidjames77 at yahoo dot com | Date: | Thu, 05 May 2005 22:42:05 +0000 |
| Subject: | Bug #4292 [NEW]: setPattern sample code is misleading | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5986@lists.php.net to get a copy of this message | ||
From: davidjames77 at yahoo dot com
Operating system:
PHP version: Irrelevant
Package: Documentation
Bug Type: Bug
Bug description: setPattern sample code is misleading
Description:
------------
The sample code for Format::setPattern
http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setpattern.php
has a few mistakes.
Could use a small change to these three lines:
$worksheet->write(1, $i, "another pattern", $another_format1);
$worksheet->write(1, $i, "another pattern", $another_format2);
$worksheet->write(1, $i, "another pattern", $another_format3);
I recommend they be changed to:
$worksheet->write(1, $i, "bg=r", $another_format1);
$worksheet->write(2, $i, "fg=r", $another_format2);
$worksheet->write(3, $i, "fg=r,bg=g", $another_format3);
That way, you actually get three lines of output. And you can easily see
which examples are which by the bg= and gb= text.
Reproduce code:
---------------
See source code example on
http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setpattern.php
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=4292&edit=1
--