limingxinleo/utils-excel

简单的Excel工具类

0.1.1 2017-07-29 10:35 UTC

This package is auto-updated.

Last update: 2024-10-17 19:21:01 UTC


README

使用方法

use limx\Utils\Facades\Excel;

$path = ROOT_PATH . '/storage/temp/';
if (!is_dir($path)) {
    mkdir($path, 0777, true);
}

$data = [
    ['ID', 'NAME', 'SEX'],
    [1, 'limx', '男'],
    [2, 'lmx', '男'],
    [3, 'Agnes', '女']
];

$file = 'test';
Excel::sheet(0)->title('测试')->create($this->data)->store($file, $path, 'xls');