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

handrian07's avatar

Maatwebsite/Excel 3.1

i have this code to export an excel file that has a sheet named "hello" and has a value on A1 "Hello"

return Excel::download(function($excel) {
            //create a sheet with hello on A1
            $excel->sheet('hello', function($sheet){
                $sheet->setCellValue('A1', 'Hello');
            });
        }, 'Custom Excel.xlsx');

but what i got is a blank excel file, is there anything that i do wrong?

0 likes
3 replies
handrian07's avatar

@jaseofspades88 all im trying to do is just to create an excel that have a string "hello" on A1 cell, do i have to create collection to do that?

Please or to participate in this conversation.