public function finalize($output)
    {
        $zipFileUrl = sys_get_temp_dir() . '/' . uniqid();

        $this->fillZipWithFileContents($zipFileUrl);
        if (!$this->zip->close()) {
            throw new \RuntimeException('Failed to close zip file!');
        }

        $this->copyToOutputAndCleanup($output, $zipFileUrl);
    }
public function finalize($output)
    {
        $zipFileUrl = sys_get_temp_dir() . '/' . uniqid();

        $this->fillZipWithFileContents($zipFileUrl);
        if (!$this->zip->close()) {
            throw new \RuntimeException('Failed to close zip file!');
        }

        $this->copyToOutputAndCleanup($output, $zipFileUrl);
    }
public function finalize ( $ output ) { $ zipFileUrl = sys_get_temp_dir ( ) . '/' . uniqid ( ) ; $ this -> fillZipWithFileContents ( $ zipFileUrl ) ; if ( ! $ this -> zip -> close ( ) ) { throw new \ RuntimeException ( 'Failed to close zip file!' ) ; } $ this -> copyToOutputAndCleanup ( $ output , $ zipFileUrl ) ; }
Finalize the xlsx file.

@param resource $output
Finalize the xlsx file .