-
I am trying to import a date into a spreadsheet from a tab delimited file. I have tried to format of mm/dd/yy and also yyyy-mm-dd in the sourcce file. I then write the spreadsheet out as xls. The mm/dd/yy format comes in as text and the yyyy-mm-dd comes in and shows in that format. I tried using a line of code to format those cells, but they don't change. I have this code trying to format the date: $spreadsheet->getActiveSheet()->getStyle('A14:A30')->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DMYSLASH); I am thinking there has to be a way to import a date so that it is stored as an excel internal format date so that you can then apply the date format to it, but I cannot find documentation on how to do this and cannot get it to work. Seems like it would be a common thing. Thanks in advance for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Use the Advanced Value Binder for the import, this tries to identify the nature of the data based on some basic pattern matching. |
Beta Was this translation helpful? Give feedback.
Use the Advanced Value Binder for the import, this tries to identify the nature of the data based on some basic pattern matching.