lightshire / laravel-phpexcel-wrapper
PHPOffice PHPExcel wrapper
Installs: 797
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/lightshire/laravel-phpexcel-wrapper
Requires
- php: >=5.3.0
- illuminate/support: 4.x
- phpoffice/phpexcel: 1.8.0
This package is not auto-updated.
Last update: 2025-10-11 20:31:39 UTC
README
Installation
-
Require package via composer.json
lightshire/laravel-phpexcel-wrapper
-
Run composer update
$ composer update
-
Open app/config/app.php and add ServiceProvider to 'providers' array
'Lightshire\PHPExcel\ServiceProvider',
-
Optionally add to aliases
'Excel' => 'Lightshire\PHPExcel\Facade',
Usage
Create Excel xls file from array
Excel::fromArray( array(
array('1', '2', '3'),
array('X', 'Y', 'Z')
) )->save( base_path() . '/sample.xls' );
Create Excel xlsx file from array
Excel::fromArray( array(
array('Hello', 'World', '!!!'),
array('X', 'Y', 'Z')
) )->save( base_path() . '/sample.xlsx' );
Create array from Excel file
Excel::excel2Array( base_path() . '/sample.xls' );