I am using PHPExcel to read data from Excel. This does not give me the correct cell number format, even if I set it as the date format ("YYYY-MM-DD"). The code I use
$reader = new PHPExcel_Reader_Excel5(); $reader->setReadDataOnly(true); $PHPExcel = $reader->load($file ); $format = $PHPExcel->getActiveSheet()->getStyle('A1')->getNumberFormat()->getFormatCode(); var_dump($format);
I always get a general. I do not know which column will be the date format, so the part should be programmatic.
thanks
source share