moonlandsoft / yii2-phpexcel

Exporting PHP to Excel
MIT License
135 stars 89 forks source link

how to set for importing date? #2

Closed bubifengyun closed 8 years ago

bubifengyun commented 8 years ago

when importing excel, there is date, like this, 1990/1/1. This will get string like 01-01-90.

I know how to use phpexcel by

$phpexcel->getCellByColumnAndRow($column,$row)->getFormattedValue()

how to set $config, in your $data = \moonland\phpexcel\Excel::import($fileName, $config);

thank you.

bubifengyun commented 8 years ago

I have solved, thanks for your great work.

in excel, I should set the cell format as 1990/1/31. so it can be read correctly. it is not self setting formatter in excel.