Illegal Characters in Excel2007

May 7, 2008 at 3:45 PM
Once my Excel2007 file was created and opened it, Excel2007 gave me a message saying there are some illegal characters or it is corrupted and will try to recover it. When recovered, many parts are missing.

Just wanted to know if anyone has a list of these illegal characters and if we need to:

- escape them in some way
- replace them with some equivalent code, like an ascii code
- or just delete them

My tool is a search engine keyword research tool to the data I get is really in weird characters sometimes so I have no control on my input data.
May 7, 2008 at 3:45 PM

BenjArriola wrote:
Once my Excel2007 file was created and opened it, Excel2007 gave me a message saying there are some illegal characters or it is corrupted and will try to recover it. When recovered, many parts are missing.

Just wanted to know if anyone has a list of these illegal characters and if we need to:

- escape them in some way
- replace them with some equivalent code, like an ascii code
- or just delete them

My tool is a search engine keyword research tool to the data I get is really in weird characters sometimes so I have no control on my input data.


Probably in the meantime, I will just remove all special characters and just leave in alphanumerics as my data.
Coordinator
May 8, 2008 at 6:20 AM
Can you send me a copy of the corrupted file? (maarten =AT= phpexcel =DOT= NET)
Coordinator
May 8, 2008 at 12:52 PM
Try using utf8_encode:
$objPHPExcel->getActiveSheet()->setCellValue('C' . $row, utf8_encode($currArray["WP_NAME"]));