Skip to content

Commit 1ab2bb4

Browse files
committed
Fixed sheet index bug
1 parent 3515e19 commit 1ab2bb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ExcelFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ public function createSheets()
133133
} elseif (!is_object($config)) {
134134
throw new \Exception('Invalid sheet configuration');
135135
}
136-
$i++;
137136
$sheet = ($i === 0) ?
138137
$workbook->getActiveSheet() : $workbook->createSheet();
139138
if (is_string($title)) {
140139
$sheet->setTitle($title);
141140
}
142141
Yii::createObject($config, [$sheet])->render();
142+
$i++;
143143
}
144144
$this->_sheetsCreated = true;
145145
}

0 commit comments

Comments
 (0)