Tuesday, 21 August 2012

PHP excel $objPHPExcel limit to 2 decimal places

this is what  worked for me

$objPHPExcel->getActiveSheet()->getStyle('H'.($current_row + 28))->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00);

php excel ->getNumberFormat()->setFormatCode

what does PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00 mean









I've seen other solutions but the above worked perfectly for me.

2 comments: