Excel::load(storage_path('excel/Erez_Summary_Datasheet.xls'), function($excel) use($patient_export) {
$excel->sheet( "Erez_Summary_Datasheet", function($sheet) use($patient_export) {
$sheet->fromArray($patient_export);
});
})->store('xls', storage_path('excel'));
Currently not supported.
Any update on this anyone has been done ...the exact I need. Can anybody help me on this?
@raghbendra2015 i need help on this issue i am trying to add extra sheet in existing excel file button every time it's show "Illegal offset type in isset or empty". can you help me?
Has this now been added? I am facing the exact same issue. Thank you.
I did in a different way. Ex. In my case three sheets in single excel file. two are static sheet and the third one is dynamic. so in excel generation time create three sheets. not an included third one in existing excel file.
@sujalpatel022 That sounds perfect. Could you paste the code here?
` Excel::create('ABCReport_' . date("m/d/Y"), function ($excel) use ($data) {
// Start Static Sheet
$excel->sheet('A', function ($sheet) use ($data) {
$sheet->loadView('admin.abcReports.a'); // Sheet one data load using view A
});
$excel->sheet('B', function ($sheet) use ($data) {
$sheet->loadView('admin.abcReports.b'); // Sheet one data load using view B
});
$excel->sheet('C', function ($sheet) use ($data) {
$sheet->loadView('admin.abcReports.c'); // Sheet one data load using view C
});
// End Static Sheet
// Dynamic sheet added
$excel->sheet('ABCReport', function ($sheet) use ($data) {
$sheet->loadView('admin.abcReportTemplate')->withdata($data);
});
// End Dynamic Sheet
})->export($type);`
@sujalpatel022 Thank you.
welcome. happy to help you.
Most helpful comment
I did in a different way. Ex. In my case three sheets in single excel file. two are static sheet and the third one is dynamic. so in excel generation time create three sheets. not an included third one in existing excel file.