You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
Yes, it's still reproducable
What version of Laravel Excel are you using?
3.1.51
What version of Laravel are you using?
10
What version of PHP are you using?
8.3
Describe your issue
I am having this error sometimes when I want to download an excel : /usr/share/nginx/html/storage/framework/cache/laravel-excel/laravel-excel-1psS0VMO9G0yPaBxMh62mwjJyCePqZAD.html is an Invalid HTML file.
I dont know why but sometimes it downloads me an excel with kb or not it depends i don´t know why too and other times it returns the error I have mentioned before.
How can the issue be reproduced?
my code is quite extensive so im going to show you just some parts of it.
the way I download it in my controller is like this :
namespace App\Services\ItemOnHand;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\DB;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
use PhpOffice\PhpSpreadsheet\Style\Fill;
use Maatwebsite\Excel\Concerns\WithStyles;
use Illuminate\Contracts\Queue\ShouldQueue;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class GenerateXls implements FromView,ShouldAutoSize,WithStyles,ShouldQueue
{
public $nView;
public $covLocation;
public $itemId;
public $name;
public $groupName;
public $status;
public $item;
public $date;
public function __construct($id,$view,$covLocation,$name){
$this->name = $name;
$this->itemId = $id;
$this->covLocation = $covLocation;
$this->nView = $view;
$this->item = $this->getItemData();
$this->groupName = $this->getGroupName();
$this->status = $this->getStatus();
$this->date = $this->getDate();
}
public function view(): View
{
return view('reports.item-on-hand.item-on-hand-report', ['type'=>'xls','id'=>$this->itemId,'nView'=> $this->nView,'covLocation'=> $this->covLocation,'name'=>$this->name]);
}
}
Eventually, the only blade I have is this :
<p>{{ $name }}</p>
### What should be the expected behaviour?
At least the suspected outcome is to download the excel and dont retrieve that error.
The text was updated successfully, but these errors were encountered:
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.51
What version of Laravel are you using?
10
What version of PHP are you using?
8.3
Describe your issue
I am having this error sometimes when I want to download an excel : /usr/share/nginx/html/storage/framework/cache/laravel-excel/laravel-excel-1psS0VMO9G0yPaBxMh62mwjJyCePqZAD.html is an Invalid HTML file.
I dont know why but sometimes it downloads me an excel with kb or not it depends i don´t know why too and other times it returns the error I have mentioned before.
How can the issue be reproduced?
my code is quite extensive so im going to show you just some parts of it.
the way I download it in my controller is like this :
Then part of the GeneratXls class is:
The text was updated successfully, but these errors were encountered: