SpartnerNL / Laravel-Excel

🚀 Supercharged Excel exports and imports in Laravel
https://laravel-excel.com
MIT License
12.18k stars 1.9k forks source link

[Bug]: #4153

Open SergioAraya opened 2 months ago

SergioAraya commented 2 months ago

Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?

What version of Laravel Excel are you using?

3.1.55

What version of Laravel are you using?

8.1.0

What version of PHP are you using?

8.1.29

Describe your issue

Captura desde 2024-06-19 10-56-52

How can the issue be reproduced?

By generating a report

What should be the expected behaviour?

a working report

MarkBaker commented 2 months ago

Somewhere you are outputting two whitespaces before the file is generated, so they appear at the beginning of the filestream and are included in the file when it is saved

SergioAraya commented 2 months ago

The thing is that in dev it works fine.

maatwebsite/excel version: "3.1.55"

Dev: php version: 8.1.29

Prod: php version: 8.1.27

MarkBaker commented 2 months ago

So something is different between your dev and your prod. Those spaces are visible in the output you've shown, immediately before the 'PK' on that first line.