laravel maatwebsite/Excel导出多个sheet

ob_clean();
        Excel::create(iconv('UTF-8', 'GBK', $reportname), function ($excel) use ($cellData,$cellData2, $sheetname) {
            $excel->sheet($sheetname, function ($sheet) use ($cellData) {
                $sheet->rows($cellData);
            });
                  $excel->sheet($sheetname2, function ($sheet) use ($cellData2) {
                $sheet->rows($cellData2);
            });
            

        })->export('xls');

你可能感兴趣的:(laravel)