Laravel-excel: [QUESTION] Laravel (5.2) Excel download xlsx error ERR_INVALID_RESPONSE (chrome)

Created on 10 Oct 2016  路  7Comments  路  Source: Maatwebsite/Laravel-Excel

when I tried to test export to xlsx,get error ERR_INVALID_RESPONSE (chrome),but it worked in xls or csv.

Excel::create($filename, function ($excel) use ($data) {
            $excel->sheet('01', function ($sheet) use ($data) {
                $sheet->rows($data);
                $sheet->setAutoSize(true);
            });
        })->download('xlsx');

I tried to add

ob_end_clean();
ob_start();

or

set_time_limit(0);
ini_set('memory_limit', '1G');

before Excel::creat(...), but not work. How can I solve it?

Package version, Laravel version

2.1.0, 5.2.32

Most helpful comment

You are right. I think I'm missing php_zip.
Thank you!

All 7 comments

I'm having the same issue with the same package and Laravel versions on Ubuntu with PHP 7.0. I can only get CSV export to work.

Did you check if your environment matches all requirements for (xlsx) ?

http://www.maatwebsite.nl/laravel-excel/docs/getting-started#requirements

You are right. I think I'm missing php_zip.
Thank you!

I have already install all requirement but still can't export blade to xlsx, here is my code
```
Excel::create('Export filter data', function($excel){
$excel->sheet('Failed', function($sheet)
{
$sheet->loadView('coba');
});
})->export('xlsx');

I am also facing the same issue even environment matches all requirements. Did anyone solve this?
Please share if so.

Hi
Zip | enabled
-- | --
Zip version | 1.13.4
Libzip version | 1.1.2

My phpinfo(), php_zip installed already but still can not export excel
This site can鈥檛 be reached
The webpage at url might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE
Please help me!

Hi,
In my case, PHP7.2 was installed but Nginx was configured to 7.0, I reconfigured Nginx to use PHP7.2 and it works now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pamekar picture pamekar  路  3Comments

bahmanyaghoobi picture bahmanyaghoobi  路  3Comments

matthewslouismarie picture matthewslouismarie  路  3Comments

thearabbit picture thearabbit  路  3Comments

muhghazaliakbar picture muhghazaliakbar  路  3Comments