PHP Excel date format problem

Mar 16, 2012 at 8:41 AM
Edited Mar 16, 2012 at 8:58 AM

Hello

code sample

.....

require_once 'excel/PHPExcel.php';

require_once 'excel/PHPExcel/Cell/AdvancedValueBinder.php';


PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() );

.....

 

$objPHPExcel->setActiveSheetIndex(0)
                                ->setCellValue('A1', '12/08/2010')
                                ->setCellValue('A2', '14/12/2013');

 

Why is that that value binder doesn't recognize that it's a date? Therefore Excel handles the data as string so no sorting :(

 

Many thanks for your reply.

Peter