PHP code example of uranum / yii2-excel-exchange

1. Go to this page and download the library: Download uranum/yii2-excel-exchange 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/ */

    

uranum / yii2-excel-exchange example snippets


	'modules' => [
//      ...
		'excel' => [
			'class'  => 'uranum\excel\Module',
			'params' => [
				'uploadPath' => 'uploads', // the path relative to the root
				'fileName'   => 'export',
				'extensions' => 'xls, xlsx',
			],
		],
	],

use uranum\excel\ExcelExchanger;

//...

echo ExcelExchanger::widget([
	'mainModelName' => $searchModel::className(), // here place model class name
 ]);