techone/php-excel

There is no license information available for the latest version (v0.2) of this package.

A pure PHP library for reading and writing spreadsheet files for ThinkPHP projects.

v0.2 2018-12-05 15:15 UTC

This package is auto-updated.

Last update: 2024-04-20 17:22:59 UTC


README

一个基于PhpSpreadsheet的拓展包,简化了Excel的导出和导入。

安装

通过composer安装这个扩展:

composer require techone/php-excel

快速开始

创建一个导出类:

use TechOne\Excel\Concerns\FromArray;

class UsersExport implements FromArray
{
    public function array()
    {
        return [
        	[1, 2, 3], 
        	[1, 2, 3]
        ];
    }
}

可以这样调用:

Excel::download(new UsersExport(), 'data.xlsx');

协议

PHP-Excel采用 Apache 2.0 license 开源协议发布。

联系

有问题请提交 Issues:https://github.com/techoner/php-excel/issues