Bug #16615 [Opn->Bgs]: call to undifined method setColumn()
| From: | daniel dot oconnor at gmail dot com | Date: | Thu, 17 Sep 2009 02:58:20 +0000 |
| Subject: | Bug #16615 [Opn->Bgs]: call to undifined method setColumn() | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-1659@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=16615&edit=1
ID: 16615
Updated by: daniel.oconnor@gmail.com
Reported By: babusek at gmail dot com
Summary: call to undifined method setColumn()
-Status: Open
+Status: Bogus
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Linux
Package Version: Unknown
PHP Version: 5.1.6
Roadmap Versions:
New Comment:
-Status: Open
+Status: Bogus
$sheet =& $excel->addWorksheet('Home');
$sheet->setColumn(0,0,29);
addWorksheet is returning a PEAR Error.
Your code doesn't check for that.
Previous Comments:
------------------------------------------------------------------------
[2009-09-16 11:29:04] babusek
Description:
------------
<?php
$xml = simplexml_load_file("featureDetail.xml");
require_once 'Spreadsheet/Excel/Writer.php';
$excel = new Spreadsheet_Excel_Writer();
$sheet =& $excel->addWorksheet('Home');
$sheet->setColumn(0,0,29);
$sheet =& $excel->addWorksheet('Home2');
$sheet->setColumn(0,0,29);
for($i=0;$i<10;$i++)
{
$sheet =& $excel->addWorksheet('Home');
$sheet->setColumn(0,0,29);
}
foreach($xml->FEATURE as $feature)
{
global $excel;
require_once 'Spreadsheet/Excel/Writer.php';
$sheet123 =& $excel->addWorksheet(html_entity_decode($feature->NAME));
$sheet123->setColumn(0,0,29);
}
foreach($xml->FEATURE as $feature)
{
$sheet =& $excel->addWorksheet(html_entity_decode($feature->NAME));
$sheet->setColumn(0,0,29);
}
?>
Test script:
---------------
Showing Error when we call setColumn() method from a loop.
Expected result:
----------------
Fatal error: Call to undefined method PEAR_Error::setColumn() in
D:\xampp\htdocs\Release9.0\example.php on line 13
Actual result:
--------------
Sucessfull add all worksheets to a workbook , and each worksheet should
have column width set by setColumn
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16615&edit=1