public function save($file, $excelWriterType = 'Excel2007')
    {
        if (!$this->phpexcel instanceof \PHPExcel) {
            throw new HtmlPhpExcelException('You must run process() first to create a phpexcel instance');
        }

        $writer = \PHPExcel_IOFactory::createWriter($this->phpexcel, $excelWriterType);
        $writer->save($file);

        return $this;
    }
public function save($file, $excelWriterType = 'Excel2007')
    {
        if (!$this->phpexcel instanceof \PHPExcel) {
            throw new HtmlPhpExcelException('You must run process() first to create a phpexcel instance');
        }

        $writer = \PHPExcel_IOFactory::createWriter($this->phpexcel, $excelWriterType);
        $writer->save($file);

        return $this;
    }
public function save ( $ file , $ excelWriterType = 'Excel2007' ) { if ( ! $ this -> phpexcel instanceof \ PHPExcel ) { throw new HtmlPhpExcelException ( 'You must run process() first to create a phpexcel instance' ) ; } $ writer = \ PHPExcel_IOFactory :: createWriter ( $ this -> phpexcel , $ excelWriterType ) ; $ writer -> save ( $ file ) ; return $ this ; }
Save the created excel file

@param string $excelWriterType
@throws Exception\HtmlPhpExcelException
Save the created excel file