marshallgosling/php-excel
最新稳定版本:1.0.7
Composer 安装命令:
composer require marshallgosling/php-excel
包简介
phpExcel for Laravel
README 文档
README
PHPExcel library compatible with Laravel Framework >= 8.x
use Nathan\PHPExcel\IOFactory; use Nathan\PHPExcel\PHPExcel; function createObj() { $objPHPExcel = new PHPExcel(); // Set document properties $objPHPExcel->getProperties()->setCreator($creator) ->setLastModifiedBy($creator) ->setTitle($title) ->setSubject($subject) ->setDescription($description) ->setKeywords($keywords) ->setCategory($category); } function loadTemplate($file) { $objPHPExcel = IOFactory::load($file); } function outputFile($filename, $mode='file') { $objWriter = IOFactory::createWriter($objPHPExcel, 'Excel2007'); if($mode == 'stream') { // Redirect output to a client’s web browser (Excel2007) header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); header('Content-Disposition: attachment;filename="'.$filename.'"'); header('Cache-Control: max-age=1920'); $objWriter->save('php://output'); exit; } if($mode == 'file') { $objWriter->save($filename); } }
统计信息
- 总下载量: 38
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-12