diff --git a/Spreadsheet/Excel/Writer/Worksheet.php b/Spreadsheet/Excel/Writer/Worksheet.php index e36a743..28c41e5 100644 --- a/Spreadsheet/Excel/Writer/Worksheet.php +++ b/Spreadsheet/Excel/Writer/Worksheet.php @@ -774,7 +774,7 @@ public function getData($cleanup = true) fclose($this->_filehandle); $this->_filehandle = ''; } - @unlink($this->_tmp_file); + file_exists($this->_tmp_file) && @unlink($this->_tmp_file); $this->_tmp_file = ''; $this->_using_tmpfile = false; $this->_datasize = 0;