private function writeFileToTmp($filename, $format = 'Excel2007', $disconnect = true)
    {
        $path = sprintf('%s/%s', $this->tempPath, $filename);
        $objWriter = \PHPExcel_IOFactory::createWriter($this->file, $format);
        $objWriter->save($path);

        if ($disconnect) {
            $this->file->disconnectWorksheets();
            unset($this->file);
        }

        $this->fileName = $filename;
        $this->filePath = $path;

        return array($path, $filename);
    }
private function writeFileToTmp($filename, $format = 'Excel2007', $disconnect = true)
    {
        $path = sprintf('%s/%s', $this->tempPath, $filename);
        $objWriter = \PHPExcel_IOFactory::createWriter($this->file, $format);
        $objWriter->save($path);

        if ($disconnect) {
            $this->file->disconnectWorksheets();
            unset($this->file);
        }

        $this->fileName = $filename;
        $this->filePath = $path;

        return array($path, $filename);
    }
private function writeFileToTmp ( $ filename , $ format = 'Excel2007' , $ disconnect = true ) { $ path = sprintf ( '%s/%s' , $ this -> tempPath , $ filename ) ; $ objWriter = \ PHPExcel_IOFactory :: createWriter ( $ this -> file , $ format ) ; $ objWriter -> save ( $ path ) ; if ( $ disconnect ) { $ this -> file -> disconnectWorksheets ( ) ; unset ( $ this -> file ) ; } $ this -> fileName = $ filename ; $ this -> filePath = $ path ; return array ( $ path , $ filename ) ; }
Create excel file and store in tmp dir

@param string $filename
@param string $format
@param bool   $disconnect
@throws \Exception
@return array
Create excel file and store in tmp dir