getNumberFormat() returns General even though it is a date

Topics: User Forum
Oct 6, 2013 at 2:11 PM
getNumberFormat() returns General even though the cell I performed it on contains a date. getValue() returns the value perfectly but in number format. May I know what is wrong?
Oct 11, 2013 at 9:27 AM
Here is what you use setReadDataOnly(true)? In this case, you lose the notion of format.
Whatever the case, getValue() returns the raw value, if you want to have the value formatted, subject to have something with getFormatCode, used getFormattedValue.
If you know that the value is a date, and that you have loaded the file without formats, uses PHPExcel_Style_NumberFormat::toFormattedString