I am using the package maatwebsite.com/excel for exporting xls
files from my app. I want to pre-format the cell to date. Is it possible?
I have formatted the data to date, but I want that the cell would be pre-formatted with date
(its default cell format is general
). How can I achieve this in PHP
or Laravel 4
?
Have you tried this yet?
$sheet->setColumnFormat(array(
'A' => 'yyyy-mm-dd'
));
From the documentation: http://www.maatwebsite.nl/laravel-excel/docs/export#format
Different date formats are available here: http://www.maatwebsite.nl/laravel-excel/docs/reference-guide#formatting