Calculation Exception error on cell without calculation

Topics: Developer Forum
Jun 2, 2014 at 6:27 PM
Hello all,

I'm relatively new to PHPExcel and I'm having a problem with the following error:

<br />
<b>Fatal error</b>: Uncaught exception 'PHPExcel_Calculation_Exception' with message 'Worksheet!I2 -> internal error' in /home/rladmin/public_html/includes/PHPExcel/Cell.php:298
Stack trace:

0 /home/rladmin/public_html/includes/PHPExcel/Worksheet.php(717): PHPExcel_Cell->getCalculatedValue()

1 /home/rladmin/public_html/includes/PHPExcel/Writer/Excel5/Worksheet.php(295): PHPExcel_Worksheet->calculateColumnWidths()

2 /home/rladmin/public_html/includes/PHPExcel/Writer/Excel5.php(187): PHPExcel_Writer_Excel5_Worksheet->close()

3 /home/rladmin/public_html/reports/crud.php(539): PHPExcel_Writer_Excel5->save('php://output')

4 {main}

The Excel file is being generated programmatically but as near as I can tell, cell I2 is blank. It's being used in a calculation on a later cell but not at this point.

The code that writes that (and other blank cells) is this: $objPHPExcel->getActiveSheet()->SetCellValue(number_to_letter($columnkey + 1) . ($rowkey + $datarowincrement), '');

I also tried SetCellValueExplicit but got the same error and I verified that my number_to_letter function is properly coming up with cell I2.

Thanks to anyone who can point me in the right direction!