I added this method to output my XLS file to the browser:
$this->fp = @fopen($this->fileName,"r");
$this->buffer = fread($this->fp,filesize($this->fileName));
echo ('Some data has already been output to browser, can\'t send XLS file');
header('Content-disposition: inline; filename="'.$this->fileName.'"');
$this->fileName is assigned in the constructor.
I call $this->output() after the call to fclose in the close method. To clean up the server I call unlink.