Bug #16615 [Com]: call to undifined method setColumn()
| From: | babusek@gmail.com | Date: | Thu, 17 Sep 2009 05:38:55 +0000 |
| Subject: | Bug #16615 [Com]: call to undifined method setColumn() | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-1661@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
Comment by: babusek@gmail.com
Reported By: babusek at gmail dot com
Summary: call to undifined method setColumn()
Status: Bogus
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Linux
Package Version: Unknown
PHP Version: 5.1.6
Roadmap Versions:
New Comment:
HI doconnor,
sorry i didn't get u.
as i am able to set the column of any worksheet until unless the
setColumn method is not in a loop.
if i put the setColumn() method in a loop, the SpreadSheetExcel writer
throwing the error.
can u explain me what is 'Your code doesn't have check' ?
here i dont want to know whether worksheet is throwing peer Error or
not. i want a fix on this.
Previous Comments:
------------------------------------------------------------------------
[2009-09-17 03:58:20] doconnor
-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.
------------------------------------------------------------------------
[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