Open Sicklou opened 2 years ago
Hi, Sicklou! I've used this way with Livewire (it also may be used as a response in web controller).
return response()->streamDownload(function () {
return (new FastExcel($collection))
->export('php://output');
}, sprintf('leads-%s.xlsx', date('Y-m-d')));
Laravel 9.5, PHP 8.1
Laravel version : v8.83.4 fast-excel version : v3.2.0
Hello,
When using the download method, I was expecting to have a file named after the download parameter (here in the example export_test.xlsx).
But it downloads a file named "download" without extension.
So I took a look into the download function, and this is what works for me, if I add a string to the streamDownload function as second parameter (as the laravel doc suggests : https://laravel.com/docs/8.x/responses#streamed-downloads).
Since I couldn't find anyone else with the problem, I was wondering if I was not using it wrong.