Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 90224

How to change code upgrade from 2.x to 3.x in maatwebsite/excel

$
0
0

I migrated my application to laravel 6.0 .When installing the packages in the composer.json i upgraded from "maatwebsite/excel:~2.1.0" to "maatwebsite/excel": "^3.1".So now my export function does not work anymore.I tried to follow the upgrade in https://docs.laravel-excel.com/3.1 but didn't work for me.this is the old code that used to work in the old version:

Excel::create($bang,function($excel) use ($array_Data ,$bang)
        {
            $excel->setTitle($bang);
            $excel->sheet($bang,function($sheet) use($array_Data,$bang){
            $sheet->fromArray($array_Data,null,'A1',false,false);   
            });
        })->download('xlsx');

Viewing all articles
Browse latest Browse all 90224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>