当单元格中包含带有特殊字符的公式时,PHPExcel getCalculatedValue()返回错误答案
这是我的一段代码,我遇到了麻烦当单元格中包含带有特殊字符的公式时,PHPExcel getCalculatedValue()返回错误答案,php,phpexcel,Php,Phpexcel,这是我的一段代码,我遇到了麻烦 $where = "O".$i; $formula = '=IFERROR(IF(OR(C'.$i.'="výzva",C'.$i.'="string2"),E'.$i.'," ")," ")'; $objPHPExcel->getActiveSheet()->setCellValue($where, $formula); $objPHPExcel->getActiveSheet()->getCell($where)->getCalc
$where = "O".$i;
$formula = '=IFERROR(IF(OR(C'.$i.'="výzva",C'.$i.'="string2"),E'.$i.'," ")," ")';
$objPHPExcel->getActiveSheet()->setCellValue($where, $formula);
$objPHPExcel->getActiveSheet()->getCell($where)->getCalculatedValue();
我使用了官方的调试函数testFormula($sheet,$cell)
,我注意到“výzva”一词在评估过程中出现了问题。我的脚本是用UTF-8编码的,以确保带有特殊字符的单元格正确地写入我最后创建的.xls文件中。当用公式设置CellValue时,在.xls文件中的答案是正确的,但有没有办法从这种类型的公式中获得计算值?谢谢你的建议