Hi,
Those who are having problem with lengthy integer values which convert in xls files as scientific notation the below code solves the problem. What you need to do is place these lines in your while loop . After formatting cells data will write into cell.
while (){// Begins
$objPHPExcel->getActiveSheet()->getStyle('B'.$s)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);
$objPHPExcel->getActiveSheet()->getStyle('D'.$s)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);
$objPHPExcel->getActiveSheet()->setCellValue('B'.$s, $csvrow['LARGEINTEGER']);
}
Simple . Happy PHPEXCELING :)
Those who are having problem with lengthy integer values which convert in xls files as scientific notation the below code solves the problem. What you need to do is place these lines in your while loop . After formatting cells data will write into cell.
while (){// Begins
$objPHPExcel->getActiveSheet()->getStyle('B'.$s)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);
$objPHPExcel->getActiveSheet()->getStyle('D'.$s)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);
$objPHPExcel->getActiveSheet()->setCellValue('B'.$s, $csvrow['LARGEINTEGER']);
}
Simple . Happy PHPEXCELING :)