library/Garp/Content/Export/Excel.php
protected function _addRow(PHPExcel $phpexcel, array $row, $rowIndex) {
        $col = 0;
        foreach ($row as $key => $value) {
            $colIndex = $col++;
            if (is_array($value)) {
                $rowset = $value;
                $value = array();
                foreach ($rowset as $row) {
                    if (is_array($row)) {
                        $values = array_values($row);
                        $values = implode(' : ', $values);
                    } else {
                        $values = $row;
                    }
                    $value[] = $values;
                }
                $value = implode("\n", $value);
            }
            $phpexcel->getActiveSheet()->setCellValueByColumnAndRow($colIndex, $rowIndex, $value);
        }
    }
protected function _addRow(PHPExcel $phpexcel, array $row, $rowIndex) {
        $col = 0;
        foreach ($row as $key => $value) {
            $colIndex = $col++;
            if (is_array($value)) {
                $rowset = $value;
                $value = array();
                foreach ($rowset as $row) {
                    if (is_array($row)) {
                        $values = array_values($row);
                        $values = implode(' : ', $values);
                    } else {
                        $values = $row;
                    }
                    $value[] = $values;
                }
                $value = implode("\n", $value);
            }
            $phpexcel->getActiveSheet()->setCellValueByColumnAndRow($colIndex, $rowIndex, $value);
        }
    }
protected function _addRow ( PHPExcel $ phpexcel , array $ row , $ rowIndex ) { $ col = 0 ; foreach ( $ row as $ key => $ value ) { $ colIndex = $ col ++ ; if ( is_array ( $ value ) ) { $ rowset = $ value ; $ value = array ( ) ; foreach ( $ rowset as $ row ) { if ( is_array ( $ row ) ) { $ values = array_values ( $ row ) ; $ values = implode ( ' : ' , $ values ) ; } else { $ values = $ row ; } $ value [ ] = $ values ; } $ value = implode ( "\n" , $ value ) ; } $ phpexcel -> getActiveSheet ( ) -> setCellValueByColumnAndRow ( $ colIndex , $ rowIndex , $ value ) ; } }
Add row to spreadsheet

@param PHPExcel $phpexcel
@param array $row
@param string $rowIndex Character describing the row index
@return void
Add row to spreadsheet