PHPackages                             dashingunique/excel - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. dashingunique/excel

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

dashingunique/excel
===================

v1.0.2(5y ago)13MITPHPPHP ^7.1

Since Jun 23Pushed 5y agoCompare

[ Source](https://github.com/dashingunique/excel)[ Packagist](https://packagist.org/packages/dashingunique/excel)[ RSS](/packages/dashingunique-excel/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (2)Versions (3)Used By (0)

excel
=====

[](#excel)

Excel import/export for Php

Install via composer:

```
composer require dashingUnique/excel

```

导出文件信息
------

[](#导出文件信息)

将文件导出到 `.csv`(.xlsx .obs) 文件:

```
use dashingUnique\excel\DashingExcel;
use app\model\User;

// Load users
$users = new User()->select();
$users = uniqueCollection($users);
// Export all users
(new DashingExcel($users))->export('file.csv');
```

仅导入指定信息的列

```
$users = new User()->select();
$users = uniqueCollection($users);
(new DashingExcel($users))->export('users.csv', function ($user) {
    return [
        'Email' => $user['email'],
        'First Name' => $user['firstname'],
        'Last Name' => strtotime($user['create_time']),
    ];
});
```

导入文件信息
------

[](#导入文件信息)

导入文件信息

```
$collection = (new DashingExcel())->configureCsv(';', '#', '\n', 'gbk')->import('file.csv');
```

导入文件并写入数据库

```
$users = (new DashingExcel())->import('file.xlsx', function ($line) {
    return (new User())->create([
        'name' => $line['Name'],
        'email' => $line['Email']
    ]);
});
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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 ~0 days

Total

3

Last Release

2152d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52a1e040834dcf25202fd5beef04fa35e4acace8cf3eac8ab06c806c63b56a96?d=identicon)[dashingunique](/maintainers/dashingunique)

---

Top Contributors

[![dashingunique](https://avatars.githubusercontent.com/u/33447637?v=4)](https://github.com/dashingunique "dashingunique (7 commits)")

---

Tags

excelxlsxlsxcsv

### Embed Badge

![Health badge](/badges/dashingunique-excel/health.svg)

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

###  Alternatives

[rap2hpoutre/fast-excel

Fast Excel import/export for Laravel

2.3k24.9M47](/packages/rap2hpoutre-fast-excel)[nuovo/spreadsheet-reader

Spreadsheet reader library for Excel, OpenOffice and structured text files

669863.2k8](/packages/nuovo-spreadsheet-reader)[jianyan74/php-excel

php excel 导入导出

5842.2k4](/packages/jianyan74-php-excel)[jgrygierek/batch-entity-import-bundle

Importing entities with preview and edit features for Symfony.

101.1M1](/packages/jgrygierek-batch-entity-import-bundle)[jgrygierek/sonata-batch-entity-import-bundle

Importing entities with preview and edit features for Sonata Admin.

10951.2k](/packages/jgrygierek-sonata-batch-entity-import-bundle)[emiliogrv/nova-batch-load

A Laravel Nova XLS &amp; CSV importer

1641.8k](/packages/emiliogrv-nova-batch-load)

PHPackages © 2026

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