Skip to content

Commit 992d8b0

Browse files
committed
Fix invalid function call in ExcelWriter
1 parent bb356f3 commit 992d8b0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ExcelWriter.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,9 @@ public function write($writerType = 'Excel2007') {
2222
$xl = new PHPExcel();
2323
$sheet = $xl->getSheet(0);
2424

25-
// Sheet headers
26-
foreach ($exporter->getExportHeaders() as $colNum => $header) {
27-
$sheet->setCellValueByColumnAndRow($colNum, 1, $header);
28-
}
29-
30-
// Sheet rows
3125
foreach ($exporter->export() as $rowNum => $row) {
3226
foreach ($row as $colNum => $value) {
33-
$sheet->setCellValueByColumnAndRow($colNum, $rowNum + 2, $value);
27+
$sheet->setCellValueByColumnAndRow($colNum, $rowNum + 1, $value);
3428
}
3529
}
3630

@@ -39,4 +33,4 @@ public function write($writerType = 'Excel2007') {
3933

4034
return $filename;
4135
}
42-
}
36+
}

0 commit comments

Comments
 (0)