PHPExcel_Calculation_Exception in Cell.php line 293,Formula Error:am unexpected error occured
Error Scenario: This error usually throws because of special characters.if that characters are reserved words in the excel formula calculation. i got this error in one of my application.excel files created using large set of data. In this one of the field start with symbol (=) equal to.This time download option is not working
Solution: i tried and searched the solutions for this.i made it as the character replacement.if the first charcter is =,then append one more reliable character(i used ~) at the begining
For example
1 2 3 4 5 6 |
<?php #value='======->checking the blog'; $first_char = substr($value, 0, 1); $newval=$first_char == '=' ? '~'.$value : $value; ?> |
we can use the $newval in the excel creation