Reputation: 11151
Developing PHP application that generates Excel documents on the fly, using PHPExcel (http://phpexcel.codeplex.com/).
Problem I have is that my Excel document will contain some special HTML chars, like °
, ’
, ”
etc...
But in generated XLS file, all I getting is °
, ’
, ”
, etc, not °, ’, ”, like I need.
Can you help me how to get this in XLS documents?
Upvotes: 6
Views: 6523
Reputation: 212412
Remember that you should always use UTF-8 for strings in PHPExcel
$str = '32°Fahrenheit = 0°Centigrade';
$str = html_entity_decode($str,ENT_QUOTES,'UTF-8');
Upvotes: 12