my question is as the title said ! how can i copy an excel sheet content to another using laravel excel of maatwebsite!
Excel::load(Input::file('file'), function($file)
{
$sheet1 = $file->setActiveSheetIndex(0);
Excel::create('Filename', function($excel) use($sheet1) {
// Create first sheet
$excel->sheet('First sheet', function($sheet) use ($sheet1){
$sheet = $sheet1;
});
})->export('xls');
});
Excel::load(Input::file('file'), function($file)
{
$sheet1 = $file->setActiveSheetIndex(0);
Excel::create('Filename', function($excel) use($sheet1) {
// add $sheet1 for new file
$excel->addExternalSheet($sheet1)
})->export('xls');
});