PHP code example of iteracode / excel

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

    

iteracode / excel example snippets


	Plugin::load('Iteracode/Excel', ['bootstrap' => true, 'routes'=>true]);

	public function initialize()
		{
        		parent::initialize();
        		$this->loadComponent('RequestHandler', [
            			'viewClassMap' => ['xlsx' => 'Iteracode/Excel.Excel']
        ]);
        	}
  
<?= $this->fetch('content') 
    
    $this->Excel->addWorksheet($articles, 'Articles');

    <?= $this->Html->link(__('Excel'), ['controller' => 'Articles', 'action' => 'index', '_ext'=>'xlsx']);