PHP code example of maraya / cake-php-excel

1. Go to this page and download the library: Download maraya/cake-php-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/ */

    

maraya / cake-php-excel example snippets


"	"maraya/cake-php-excel": "1.1.*"
},
"config": {
	"vendor-dir": "Vendor/"
},
"extra": {
    "installer-paths": {
        "Plugin/CakePHPExcel": ["maraya/cake-php-excel"]
    }
}


CakePlugin::load('CakePHPExcel', 
	array(
		'routes' => true
	)
);

'RequestHandler' => array(
	'viewClassMap' => array(
		'xls' => 'CakeExcel.Excel',
		'xlsx' => 'CakeExcel.Excel'
	)
),

class ReportsController extends AppController {
    public function clients() {
		$this->excelConfig =  array(
			'filename' => 'clients.xlsx'
		);
	}
}