PHP code example of tianmiao / excel

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

    

tianmiao / excel example snippets




$excel = new Tianmiao\Excel\ExcelExport();

$excel->write(array("费率", "笔数", "充值进账", "手续费", "利润"));
$excel->write(array(
    array("1.0%", 0, 0.00, 0, 0),
    array("合计", 0, 0.00, 0, 0),
));

$excel->save(__DIR__ . "/output.xls");