public function writeRow(array $data = [], $finalize = true)
    {
        $lastDataKey = $this->getLastArrayKey($data);
        foreach ($data as $key => $value) {
            $coordinate = sprintf('%s%d', $this->getCurrentColumn(), $this->getCurrentRow());
            $this->worksheet->setCellValue($coordinate, $value);
            if ($key !== $lastDataKey) {
                $this->nextColumn();
            }
        }

        if ($finalize) {
            $this->nextRow();
        }

        return $this;
    }
public function writeRow(array $data = [], $finalize = true)
    {
        $lastDataKey = $this->getLastArrayKey($data);
        foreach ($data as $key => $value) {
            $coordinate = sprintf('%s%d', $this->getCurrentColumn(), $this->getCurrentRow());
            $this->worksheet->setCellValue($coordinate, $value);
            if ($key !== $lastDataKey) {
                $this->nextColumn();
            }
        }

        if ($finalize) {
            $this->nextRow();
        }

        return $this;
    }
public function writeRow ( array $ data = [ ] , $ finalize = true ) { $ lastDataKey = $ this -> getLastArrayKey ( $ data ) ; foreach ( $ data as $ key => $ value ) { $ coordinate = sprintf ( '%s%d' , $ this -> getCurrentColumn ( ) , $ this -> getCurrentRow ( ) ) ; $ this -> worksheet -> setCellValue ( $ coordinate , $ value ) ; if ( $ key !== $ lastDataKey ) { $ this -> nextColumn ( ) ; } } if ( $ finalize ) { $ this -> nextRow ( ) ; } return $ this ; }
Write a row in the sheet

@param array $data
@param bool $finalize
@return self
Write a row in the sheet