劳驾,
我想使用laravel-excel导出我的报告.
这是控制器:
public function getExcelfile(){ $users = UserService::findAllPublic(); $total = UserService::count(); $total_with_photo = UserService::countWithPhoto(); Excel::create('excelfile',function($excel) use ($users,$total,$total_with_photo) { $excel->sheet('Excel',function($sheet) use ($users,$total_with_photo) { $sheet->loadVIEw('report.excel')->with("users",$users)->with("total",$total)->with("total_with_photo",$total_with_photo); }); })->export('xls'); }
这是位于报告文件夹的excel.blade.PHP:
然后出现此错误:PHPExcel_Exception
file http://myserver.com/projectname/public/assets/images/upload/DSCN1164.jpg not found!
当我尝试在浏览器中访问它时,该文件存在.最佳答案代替:
你应该使用:
当然假设它是正确的路径 总结
以上是内存溢出为你收集整理的php – laravel-excel无法使用带有图像的刀片导出xls文件全部内容,希望文章能够帮你解决php – laravel-excel无法使用带有图像的刀片导出xls文件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)