diff --git a/src/Exportable.php b/src/Exportable.php index 8b063ec..3d95a6d 100644 --- a/src/Exportable.php +++ b/src/Exportable.php @@ -2,6 +2,7 @@ namespace Rap2hpoutre\FastExcel; +use DateTimeInterface; use Generator; use Illuminate\Support\Collection; use Illuminate\Support\Str; @@ -280,7 +281,7 @@ private function transformRow($data) return collect($data)->map(function ($value) { return is_null($value) ? (string) $value : $value; })->filter(function ($value) { - return is_string($value) || is_int($value) || is_float($value); + return is_string($value) || is_int($value) || is_float($value) || $value instanceof DateTimeInterface; }); }