diff --git a/src/Spout/Writer/Common/Creator/WriterEntityFactory.php b/src/Spout/Writer/Common/Creator/WriterEntityFactory.php index 6dcebbf..d54b932 100644 --- a/src/Spout/Writer/Common/Creator/WriterEntityFactory.php +++ b/src/Spout/Writer/Common/Creator/WriterEntityFactory.php @@ -112,7 +112,7 @@ class WriterEntityFactory $cells = \array_map(function ($k, $cellValue) use ($cellStyles) { return new Cell($cellValue, $cellStyles[$k] ?? null); - }, array_keys($cellValues), $cellValues); + }, array_keys(array_values($cellValues)), $cellValues); return new Row($cells, $rowStyle); }