PHP code example of cmdev / excel

1. Go to this page and download the library: Download cmdev/excel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cmdev / excel example snippets


Excel::create('Laravel Excel', function($excel) {

    $excel->sheet('Excel sheet', function($sheet) {

        $sheet->setOrientation('landscape');

    });

})->export('xls');

"maatwebsite/excel": "~2.1.0"

Maatwebsite\Excel\ExcelServiceProvider::class,

'Excel' => Maatwebsite\Excel\Facades\Excel::class,

$excel = App::make('excel');

php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"