Jump to content

Call to undefined method PEAR_Error::setColumn()


babusek

Recommended Posts

HI guys,

i am using 'Spreadsheet excel writer' to write form data into an excel sheet.

 

below is my code snippet, uses to add worksheets, iam getting an error, which is really breaking me.

can u plz have a look at this, and help me.

<?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);
foreach($xml->FEATURE as $feature)
{
global $excel;
$value=html_entity_decode($feature->NAME);
echo " Value = $value";
echo "<br>";
$sheet123 =& $excel->addWorksheet('$value');
$sheet123->setColumn(0,0,29);
}
foreach($xml->FEATURE as $feature)
{
$sheet =& $excel->addWorksheet(html_entity_decode($feature->NAME));
$sheet->setColumn(0,0,29);
}
?>

:'(

Fatal error: Call to undefined method PEAR_Error::setColumn() in D:\xampp\htdocs\Release9.0\example.php on line 14

  • 10 months later...

For those who stumble upon this thread in a Google search (like I did), I was able to solve the problem by using short titles for my worksheets, eg:

 

$worksheet =& $workbook->addWorksheet('some really really really really really long title');

 

Is baaaad. Shorten the title.

  • 5 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.