PHP code example of luler / export-excel

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

    

luler / export-excel example snippets





�导出时,给每页指定下标即可,如下:
//\Luler\Excel\MultiPageExcelHelper::exportMultiPageExcelFile('test',
//    [
//        '第一页' => ['字段1*', '字段2*', '字段3*', '字段4',]
//    ],
//    [
//        '第一页' => [
//            [
//                '值1',
//                '值2',
//                '值3',
//                '值4',
//            ]
//        ]
//    ],
//    [
//        '第一页' => ['大标题1'],
//    ]
//);
//表头带*号会自动标红
\Luler\Excel\MultiPageExcelHelper::exportMultiPageExcelFile('test',
    [
        ['字段1*', '字段2*', '字段3*', '字段4',],
    ]
);