Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: TYPE_NUMERIC

$
0
0
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 :)

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>