can somebody tell me why am I getting this error?
PHP Fatal error: Uncaught exception 'PHPExcel_Calculation_Exception' with message 'Worksheet!E48 -> Formula Error: An unexpected error occured' in PHPExcel/1.8.0/Classes/PHPExcel/Cell.php:300
Stack trace:
#0 PHPExcel/1.8.0/Classes/PHPExcel/Writer/Excel5/Worksheet.php(460): PHPExcel_Cell->getCalculatedValue()
#1 PHPExcel/1.8.0/Classes/PHPExcel/Writer/Excel5.php(187): PHPExcel_Writer_Excel5_Worksheet->close()
#2 export/the_script.php(98): PHPExcel_Writer_Excel5->save('the_export.xls')
#3 {main}
thrown in PHPExcel/1.8.0/Classes/PHPExcel/Cell.php on line 300
The code that generates this error:
$excel = new PHPExcel();
$excel->setActiveSheetIndex(0);
$R = $db->query("SELECT col1, col2, col3 from table1");
while($row = $R->fetch(Zend_Db::FETCH_NUM)) {
$excel->getActiveSheet()->fromArray($row, false, 'A'.$i);
$i++;
}
$excelWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel5');
$excelWriter->save('the_export.xls');
As you can see, there are no formulas, no nothing... simple dumping of data from database into an excel file... Running PHP 5.3.2