PHPExcel reading a cell’s format

PHPphpexcel

I am having trouble finding out how to read a cells format. I need to know if a cell's format is a date or not because when I read it into PHP it becomes a 5 digit number from excel. I know I can take this number and then use PHPExcel to convert it into a PHP date but I first need to know that the cell I am reading is in fact a date cell.

I am wondering if there is a method like getCellFormat or something that I can use.

Thanks for the help

Nick

Best Answer

if (PHPExcel_Shared_Date::isDateTime($objPHPExcel->getActiveSheet()->getCell('A1')))
   echo 'Cell Contains a Date';
Related Topic