Skip to content

Commit

Permalink
Fix invalid function call in ExcelWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejpeters committed May 25, 2015
1 parent bb356f3 commit 992d8b0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ExcelWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@ public function write($writerType = 'Excel2007') {
$xl = new PHPExcel();
$sheet = $xl->getSheet(0);

// Sheet headers
foreach ($exporter->getExportHeaders() as $colNum => $header) {
$sheet->setCellValueByColumnAndRow($colNum, 1, $header);
}

// Sheet rows
foreach ($exporter->export() as $rowNum => $row) {
foreach ($row as $colNum => $value) {
$sheet->setCellValueByColumnAndRow($colNum, $rowNum + 2, $value);
$sheet->setCellValueByColumnAndRow($colNum, $rowNum + 1, $value);
}
}

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

return $filename;
}
}
}

0 comments on commit 992d8b0

Please sign in to comment.