Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aVadim483 committed Jun 28, 2024
1 parent e21f1fe commit d0079db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/FastExcelWriter/Writer/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,10 @@ protected function _writeSheetHead(Sheet $sheet): FileWriter

$sheetViews = $sheet->getSheetViews();
$fileWriter->write('<sheetView' . self::tagAttributes($sheetViews[0]['_attr']) . '>');
foreach ($sheetViews[0]['_items'] as $item) {
$fileWriter->write('<' . $item['_tag'] . self::tagAttributes($item['_attr']) . '/>');
if (!empty($sheetViews[0]['_items'])) {
foreach ($sheetViews[0]['_items'] as $item) {
$fileWriter->write('<' . $item['_tag'] . self::tagAttributes($item['_attr']) . '/>');
}
}
$fileWriter->write('</sheetView>');

Expand Down

0 comments on commit d0079db

Please sign in to comment.