From 992d8b068c0e572e6927f1ff06843b8020c79035 Mon Sep 17 00:00:00 2001 From: mikejpeters Date: Mon, 25 May 2015 10:38:43 -0700 Subject: [PATCH] Fix invalid function call in ExcelWriter --- ExcelWriter.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ExcelWriter.php b/ExcelWriter.php index 796bcc0..e7c61ba 100644 --- a/ExcelWriter.php +++ b/ExcelWriter.php @@ -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); } } @@ -39,4 +33,4 @@ public function write($writerType = 'Excel2007') { return $filename; } -} \ No newline at end of file +}