I know this has been asked a thousand times but what I am currently doing seems to be the general answer I see online and it is still not working correctly.
I am populating an excel document from a SQL query in which one of the columns is a ISBN10 of which can start with a 0 (but not every time) The excel rows are populated with a for each loop of which I have done in the past with no issues I've then added :
$objPHPExcel->getActiveSheet()->setCellValue('B'.$c,$row['isbn10']);
$objPHPExcel->getActiveSheet()->getStyle('B'.$c)->getNumberFormat()
->setFormatCode('0000000000');
To state that this field will be 10 digits (at least that is my current understanding that the setFormatCode will do, when the xls file is downloaded however the ISBN column still trims off all leading zeros, I'm a bit stumped with what to do as a lot of answers I've seen say this is the method you need to stop this happening?
Does anyone here have any ideas of what could possibly solve this?