kapokyue/laravel-excel
Composer 安装命令:
composer require kapokyue/laravel-excel
包简介
Supercharged Excel exports in Laravel
README 文档
README
Looking for Laravel Excel for Laravel 4? Visit the 1.3 branch
Laravel Excel brings the power of PHPOffice's PHPExcel to Laravel 5 with a touch of the Laravel Magic. It includes features like: importing Excel and CSV to collections, exporting models, array's and views to Excel, importing batches of files and importing a file by a config file.
- Import into Laravel Collections
- Export Blade views to Excel and CSV with optional CSS styling
- Batch imports
- A lot of optional config settings
- Easy cell caching
- Chunked and queued importer
- ExcelFile method injections
- Editing existing Excel files
- Advanced import by config files
- and many more...
Excel::create('Laravel Excel', function($excel) { $excel->sheet('Excel sheet', function($sheet) { $sheet->setOrientation('landscape'); }); })->export('xls');
Installation
Require this package in your composer.json and update composer. This will download the package and PHPExcel of PHPOffice.
composer require "maatwebsite/excel:~2.1.0"
In Laravel 5.5 or higher, this package will be automatically discovered and you can safely skip the following two steps.
If using Laravel 5.4 or lower, after updating composer, add the ServiceProvider to the providers array in config/app.php
Maatwebsite\Excel\ExcelServiceProvider::class,
You can use the facade for shorter code; if using Laravel 5.4 or lower, add this to your aliases:
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
The class is bound to the ioC as excel
$excel = App::make('excel');
To publish the config settings in Laravel 5 use:
php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"
This will add an excel.php config file to your config folder.
Documentation
The complete documentation can be found at: https://laravel-excel.maatwebsite.nl/docs
Support
Support only through Github. Please don't mail us about issues, make a Github issue instead.
Contributing
ALL bug fixes should be made to appropriate branch (e.g. 2.0 for 2.0.* bug fixes). Bug fixes should never be sent to the master branch.
More about contributing can be found at: https://laravel-excel.maatwebsite.nl/docs/2.1/getting-started/contributing
License
This package is licensed under MIT. You are free to use it in personal and commercial projects. The code can be forked and modified, but the original copyright author should always be included!
FAQ
- Chunk importer only imports the first row
Check that auto_detect_line_endings in your php.ini is set to true.
kapokyue/laravel-excel 适用场景与选型建议
kapokyue/laravel-excel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.19k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「excel」 「csv」 「import」 「export」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kapokyue/laravel-excel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kapokyue/laravel-excel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kapokyue/laravel-excel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This Symfony bundle integrates PhpSpreadsheet into Symfony using Twig.
PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
Yii2 export extension
PHP Excel Library
laravel facade to read/write csv file
PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
统计信息
- 总下载量: 1.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-06
