# ExcelAether **Repository Path**: virgo-sc/ExcelAether ## Basic Information - **Project Name**: ExcelAether - **Description**: No description available - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-17 - **Last Updated**: 2023-07-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ExcelAether 简单的excel 生成器 (偷懒用) 安装 ```shell composer require virgo/excel-aether ``` 使用说明 ```php //文件名称 $name = 'demo.xls'; //or $name = 'demo'; //地址 $dir = './excel'; //or $dir = './excel/'; //标题 $title = 'demo'; //表头 $header = [ 'name' => '姓名', 'phone' => '电话', 'address' => '地址' ]; //数据格式 $list = [ //key=>value 格式可以打乱 ['name' => 'zhang', 'address' => 'beijing', 'phone' => '1821', 'tt' => '333' //与表头字段不同,会自动过滤 ], ['name' => 'wen', 'address' => 'shanghia', 'phone' => '1822' ], ['name' => 'liu', 'address' => 'chengdu', 'phone' => '1823' ] ]; //或者 //表头 $header = [ '姓名', '电话', '地址' ]; //数据格式 $list = [ ['zhang', '1825', 'beijing'], ['wen', '1823', 'shengzhen'], ['liu', '1822', 'shanghai'], ['xu', '1827', 'nancong'], ['qian', '1821', 'dongjing'], ]; //使用 $re = \ExcelAether\ExcelAether::ExcelCreateBySpreadsheet($header, $list, $name, $dir, $title); var_dump($re->getDir().$re->getFileName()); ```