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

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

  • 5 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.