private function putLineValuesInSpreadsheet() { $lines = $this->dataToExcel->getAllLinesValues()->getIterator(); $currentSheet = $this->writer->getActiveSheet(); $row = 2; while ($lines->valid()) { foreach ($lines->current() as $index => $lineValue) { $currentSheet->setCellValueByColumnAndRow($index, $row, $lineValue); } ++$row; $lines->next(); } }
function printLines(DataToExcel $dataToExcel){ $iterator = $dataToExcel->getAllLinesValues()->getIterator(); printer($iterator); }
public function getValues() { return $this->dataToExcel->getAllLinesValues(); }