round formula corrupt my file

Topics: Developer Forum
May 15, 2014 at 9:05 AM

I am facing a strange behaviour when trying to use excel ROUND function in one cell: the saved file is marked as corrupted by excel, and the columns with ROUND function are empty.

The following line works fine :
$objPHPExcel->setActiveSheetIndex(0)->setCellValue($excel_column.$excel_row, '=(E'.$excel_row.'*6/1000)');
but this one does not :
$objPHPExcel->setActiveSheetIndex(0)->setCellValue($excel_column.$excel_row, '=ROUND((E'.$excel_row.'*6/1000);2)');

Do I need to change anything else in my code when using such a function ?

Thanks for your help
Marked as answer by manfried on 5/15/2014 at 3:11 AM
May 15, 2014 at 9:58 AM
Yes, you need to use a comma (,) and not a semi-colon (;) as an argument separator
May 15, 2014 at 10:10 AM
Thanks, indeed, it works better with a comma :)