我的代码:
$objPHPExcel->setActiveSheetIndex($index)->setCellValue('A1', '=SUM(2;2)');
错误:
PHPExcel_Calculation_Exception
A1->公式错误:发生意外错误(扩展名\ phpexcel \ Classes \ PHPExcel \ Cell.php:300)
#0 \ extensions \ phpexcel \ Classes \ PHPExcel \ Worksheet.php(754):PHPExcel_Cell-> getCalculatedValue()
#1 extensions \ phpexcel \ Classes \ PHPExcel \ Writer \ Excel2007 \ Worksheet.php(373):PHPExcel_Worksheet-> calculateColumnWidths()
#2 \ extensions \ phpexcel \ Classes \ PHPExcel \ Writer \ Excel2007 \ Worksheet.php(80):PHPExcel_Writer_Excel2007_Worksheet-> _ writeCols(Object(PHPExcel_Shared_XMLWriter),Object(PHPExcel_Worksheet))
#3 extensions \ phpexcel \ Classes \ PHPExcel \ Writer \ Excel2007.php(304):PHPExcel_Writer_Excel2007_Worksheet-> writeWorksheet(Object(PHPExcel_Worksheet),Array,false)
#4
答案 0 :(得分:0)
in'= SUM(2; 2)'
变化; ,
'= SUM(2,2)'