8 years later: I was getting an error when generating the XLSX file, but I discovered that it was because I was using "barryvdh/laravel-debugbar," which added a small HTML/JS snippet at the end of every file to assist with development. After removing it or disabling it by setting APP_DEBUG=false
, the XLSX file was generated normally. Check if there is any module adding texts that you cannot see.