Cell data : String containing NULL (ASCII '0') between each character

Topics: Developer Forum, User Forum
Jun 3, 2014 at 3:48 PM
Hi.. I have a excel sheet generated through PHPEXCel library. One column contain string data and the strange thing is that it shows the string size is just double in PHP, for each cell. For example, if the cell content is 'abcd' the strlen() in php shows 8. On further observations, I could realize that there are NULL characters -ASCII(0) after each character in the string. Also observed that there is one extra line at the end, but blank. Means, if there are 10 rows with data, the Maxrow shows 11.

If this file is opened in excel and save again, then all the null characters disappear. string length become 4 as expected, and maxrows will show 10 - the correct one.

Anybody please help me resolve the issue. The excel sheet generated is in version 5.

Thanks,
Justine