rap2hpoutre / fast-excel

🦉 Fast Excel import/export for Laravel
MIT License
2.08k stars 246 forks source link

Don't filter out DateTime values #357

Closed jschram closed 3 months ago

jschram commented 4 months ago

Currently all values other than string, int or float are filtered out in the transformRows method of Eportable. Since openspout does support DateTime values (see: https://github.com/openspout/openspout/blob/4.x/src/Writer/XLSX/Manager/WorksheetManager.php#L202-L203), we want to keep these values.

Note that openspout/openspout probably needs some attention as well. DateTime values are converted to Excel-compatible Date values (floats), and while it is possible to apply a date formatting to all cells of all rows, that's probably not what you want since this might incorrectly apply the style non-date values that look like Excel-dates. I'll try to implement a fix for them that optionally allows to set a formatting per column.

jschram commented 3 months ago

This PR is also included in https://github.com/rap2hpoutre/fast-excel/pull/359, so it can be closed