I have included AdvancedValueBinder.php
PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); in my code and it is working fine for all :)
except number format like 23,222.
I have included below code in AdvancedValueBinder.php .But still it is showing error ico with salary.
// Style logic - Numbers
PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); in my code and it is working fine for all :)
except number format like 23,222.
I have included below code in AdvancedValueBinder.php .But still it is showing error ico with salary.
// Style logic - Numbers
if ($dataType === PHPExcel_Cell_DataType::TYPE_NUMERIC) {
// Leading zeroes?
if (preg_match('/^\d+,\d+$/', $value)) {
// Convert value to string
$cell->setValueExplicit( $value, PHPExcel_Cell_DataType::TYPE_STRING);
// Set style
$cell->getParent()->getStyle( $cell->getCoordinate() )->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1 );
return true;
}
}
Please look into it