如何将sheet复制到phplaravelexcel中的另一个?
How to copy a sheet to another in php laravel excel?
我的问题如题!我如何使用 maatwebsite 的 excel excel 将 excel sheet 内容复制到另一个内容!
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');
});
我的问题如题!我如何使用 maatwebsite 的 excel excel 将 excel sheet 内容复制到另一个内容!
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');
});