PHP code example of lengnuan / yii2-jexcel

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

    

lengnuan / yii2-jexcel example snippets


<?= \lengnuan\jexcel\Jexcel::widget(['options' => [
        'minDimensions' => [10,10],
        'tableOverflow' => true
]]);

 $data = [
    ['US', 'Cheese', 'Yes', '2019-02-12'],
    ['CA;US;UK', 'Apples', 'Yes', '2019-03-01'],
    ['CA;BR', 'Carrots', 'No', '2018-11-10'],
    ['BR', 'Oranges', 'Yes', '2019-01-12'],
];
echo \lengnuan\jexcel\Jexcel::widget(['options' => [
        'data' => $data,
]]);