lightshire / laravel-phpexcel by imcorleone
forked from ingjohnguerrero/laravel-phpexcel

PHPOffice PHPExcel wrapper
797
1
2
Package Data
Maintainer Username: imcorleone
Maintainer Contact: giansantillan18@gmail.com (lightshire)
Package Create Date: 2014-01-28
Package Last Update: 2014-03-13
Home Page:
Language: PHP
License: Unknown
Last Refreshed: 2024-11-20 03:01:05
Package Statistics
Total Downloads: 797
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

PHPExcel Wrapper for Laravel 4

Installation

  1. Require package via composer.json

    lightshire/laravel-phpexcel-wrapper

  2. Run composer update

    $ composer update

  3. Open app/config/app.php and add ServiceProvider to 'providers' array

    'Lightshire\PHPExcel\ServiceProvider',

  4. 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' );

License

MIT license