In short what i want to do is, create several worksheets dynamically, populated with data from a database result.
So far i'm getting:
Fatal error: Call to undefined method PEAR_Error::write() in /mnt/hgfs/workspace/CCMS-Web/reports/file-excel.php on line 113
When i'm trying to do this:
$workbook = new Spreadsheet_Excel_Writer();
// sending HTTP headers
$workbook->send('excel_filename.xls');
$ReportName = "Report Name";
while ($row = $Results->fetch_assoc()) {
$worksheet_name = $row["data"];
$$worksheet_name =& $workbook->addWorksheet($campaign_name);
$$worksheet_name->write($y, 0, $ReportName,$fmtTitle);
}
Have you done this before? Is this possible? If so what is the right way to do this?