Problem: I have a problem handling a degree symbol when converting into Excel 2007.
I export data from a SQL database and format some of it before exporting to Excel. The PHP page header is set to ISO-8859-1 so I can handle accented characters but one particular record is giving me problems. The text of the field is:
The text displays on my page OK but when I export it to Excel the text becomes:
I added the ISO header because some accented characters did the same (hence mentioning it).
To set the cell I have:
I have tried to force the cell as a string type, like so:
->setCellValueExplicit('C1', '<value>', PHPExcel_Cell_DataType::TYPE_STRING)
but this causes the following error because of the degree symbol:
Detected an illegal character in input string in /var/www/html/scripts/Classes/PHPExcel/Shared/String.php on line 579
Is there a way I can get this character into Excel?