PHP code example of pmvc-plugin / excel

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

    

pmvc-plugin / excel example snippets



PMVC\Load::plug();

$data = array(
    array('year','month','amount'),
    array('2003','1','220'),
    array('2003','2','153.5'),
);

$writer = \PMVC\plug('excel')->create();
$writer->writeSheet($data);
$writer->writeToFile('output.xlsx');