Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

muqriz1010's avatar

Excel export download not working

Im testing the excel download function on tinker. When I execute the function it creates a file in the storage/framework/laravel-excel dir (file name: laravel-excel-YVzJLj3xe0vuhs2zBg3xaMbdfgto7JmxX.xlsx). But there was no file downloaded to my Downloads folder. After looking up the issue online I found that that is the temp file generated when running the download which also contains the right columns and sheets from my code. The issue is the download is not triggered.

Below is the command that I am using: Excel::download(new TestTemplateExport, 'test-template.xlsx');

Are there any other configuration that might affect this? like the config/excel.php. Did some research and tried multiple suggestions but did not work.

0 likes
3 replies
vincent15000's avatar

You have to distinguish download and store.

You can download without storing the file or you can store the file without downloading it or you can do both.

1 like
empireint05's avatar

@muqriz1010 did you got the solution?i have same issue wiith laravel 11 and frontend vue3. unable to download it with csv and excel just file is created in storage/framework/cache/laravel-excel.

devopsamit's avatar

use axios to call the export method if using vue with laravel or inertia..with default laravel blade and request it will work as it is.

Please or to participate in this conversation.