Utf-8 chars in Excel5

Topics: User Forum
May 2, 2011 at 1:24 PM

Have tried to use many receipts I'd found in the discussions, but nothing helped.

I have a .php script in 'cp1251' encoding. Local PC has winXP, remote server has Linux.

When inserting data into Phpexcel i use iconv("windows-1251", "UTF-8", $somestring) function (also tried mb_convert() ). Iconv function both on the server and on the local PC work fine - HTML output is OK. The script generates Excel5 file with utf-8 chars converted by iconv(). From the server (using save(php://output)) .xls file reads fine - all chars are displayed, but from local PC .xls file all non ASCII chars are replaced with something like "Веб"... What can it be?

May 4, 2011 at 1:46 PM

Hi, you can try using utf8_encode function... it works for me using excel5 format. Hope this can help you.