如何解决如何在 Maatwebsite\Excel 3.1 版中导出 Excel 文件?
到目前为止我已经尝试过:
Excel::download("Member List_" . date('Y-F',strtotime($date)),function ($excel) use ($data) {
$excel->sheet('First Sheet',function ($sheet) use ($data) {
$sheet->cell('A1:N1',function ($cell) {
$cell->setFontWeight('bold')->setBackground('#AAAAFF');
});
$sheet->fromArray($data);
});
})
->export('xlsx');
但它给出了错误
传递给 Maatwebsite\Excel\Excel::download() 的参数 2 必须是 类型字符串,给定的对象,调用 C:\xampp\htdocs\fbs\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php 在线 239
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。