PHPackages                             oursdreams/export - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. oursdreams/export

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

oursdreams/export
=================

A simple export plug-in

0.0.7(5y ago)0121MITPHP

Since Dec 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/oursdreams/export)[ Packagist](https://packagist.org/packages/oursdreams/export)[ RSS](/packages/oursdreams-export/feed)WikiDiscussions master Synced today

READMEChangelog (7)DependenciesVersions (8)Used By (0)

Export
======

[](#export)

基于360EntSecGroup-Skylar/excelize/v2与guzzlehttp/guzzle的导出组件

旨在一个解耦的，高效的导出服务，如果您需要更多的定制化服务应该参阅360EntSecGroup-Skylar/excelize/v2来制作自己的组件

要求
--

[](#要求)

Export本身并不会携带任何依赖，它完全依赖于laravel自主依赖包 确保您的composer依赖中存在guzzlehttp/guzzle,一般而言这是laravel项目自带依赖 使用ORACLE连接时需要建立ORACLE环境(GCC与client)

安装
--

[](#安装)

$ composer require oursdreams/export -vvv

服务
--

[](#服务)

如果您是LINUX环境，需要权限授予，您应该在启动服务前使用命令来初始化赋权

$ php artisan export

此组件默认9722端口，您应该确保您的9722端口未被占用

$ php artisan export:start

您可以通过 php artisan export 来查看所有可用命令

使用
--

[](#使用)

JSON：

```
    $export = new Export();
    $response = $export->json(["row"],[["list"]]);

    //快捷
    Export::mark($row,$list,$fileName);

```

通过传递row与list来指定表头与表身,注意此处list应为二维数组

SQL:

```
    $export = new Export();
    $export->setMysqlConnection($host, $port, $database, $username, $password, $charset, $parsetime)
    $response = $export->sql($sql, $rule);

```

SQL执行时必须设置连接，如特殊需要可通过传递第二个参数$rule来设置数据转换规则

```
例:$rule = ["rate"=>"percent"]; 将rate列转换为百分比展示
时间转换：通过特殊方法:setDateTimeColumn来设置时间列格式化为(yyyy-mm-dd HH:ii:ss)

```

其他
--

[](#其他)

合并单元格：下方示例将excel的A,B列分别从1行合并至3行

```
    $export = new Export();
    $export->setMergeFormat(["A","B"],["1"=>"3"]);

```

内部换行：下方示例将excel的A,B列设置为允许内部换行 内部换行会将所设置列内"\\r\\n"识别为换行符执行换行操作

```
    $export = new Export();
    $export->setMergeFormat(["A","B"])->setWarpTextFormat();

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~34 days

Total

7

Last Release

1858d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6eddb8052be00b5d9c486602ea8da58b4a3ed06e4d6531068a5c86b2ee0a9ab1?d=identicon)[zhou18601677143](/maintainers/zhou18601677143)

---

Top Contributors

[![oursdreams](https://avatars.githubusercontent.com/u/53559722?v=4)](https://github.com/oursdreams "oursdreams (2 commits)")

### Embed Badge

![Health badge](/badges/oursdreams-export/health.svg)

```
[![Health](https://phpackages.com/badges/oursdreams-export/health.svg)](https://phpackages.com/packages/oursdreams-export)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
