我正在使用phpexcel将某些数据库值导出为excel。当我回声的价值一切工作正常,但是当我想出口价值excel例如The Westminster Terrace,Yau Lai Rd Hong Kong
它只是在Excel中打印相同,而如果我回显它打印The Westminster Terrace, Yau Lai Rd , Hong Kong
。 数据库具有utf8_general_ci归类。我使用了下面的代码。Php Excel编码问题
foreach ($data as $question) {
$c = $c + 1;
//echo $question['their_answer'];
$objPHPExcel -> setActiveSheetIndex(0) -> setCellValue($x . $d, $question['their_answer']);
$x++;
}
如何在excel列中打印相同的回显任何想法?
感谢
Somdeb
' '和' '是实体,我认为控制字符。当你说“当我回应价值一切工作正常”,你在浏览器?如果是的话,浏览器正在渲染这些。看看源代码,它会是一样的。 – chris85
yes在浏览器中,但excel中的输出不同 –
@SomdebMukherjee因为浏览器可以解释HTML,并且它们是HTML实体。 Excel不能。 –