PHPackages                             biin2013/import-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. [File &amp; Storage](/categories/file-storage)
4. /
5. biin2013/import-export

ActiveLibrary[File &amp; Storage](/categories/file-storage)

biin2013/import-export
======================

excel import export

1.0.14(4y ago)1591MITPHPPHP ^7.4|^8.0

Since May 14Pushed 4y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (16)Used By (0)

Install
-------

[](#install)

> composer require biin2013/import-export

Import 使用说明
-----------

[](#import-使用说明)

#### Import 构造函数参数

[](#import-构造函数参数)

参数类型默认值说明filestring-导入的文件路径startRowint1开始读取数据的行数，从1开始endRowintnull结束读取数据的行数startColumnstring'A'开始读取数据的列endColumnstringnull结束读取数据的列columnFieldsarray\[\]列对应的字段名，在返回数据时自动替换列名#### Import 方法

[](#import-方法)

- setRows

    如果希望只读取指定行（非连续）的数据，在构造函数中指定开始和结束行就无法满足了， 此时可使用此方法自定义一个只需读取的行数组即可，且使用该方法指定后，构造函数中指定 的 `startRow` 与 `endRow` 失效。
- setColumns

    同 `setRows`，此处指定的为列。
- getReader

    使用该方法可得到 `PhpOffice\PhpSpreadsheet\Reader\IReader` 对象。
- getSpreadsheet

    使用该方法可得到 `PhpOffice\PhpSpreadsheet\Spreadsheet` 对象
- setOnlyReadSheetName

    使用该方法可指定只读取的 `sheet` 名称，可传入字符串或数组
- setOnlyReadSheetIndex

    使用该方法可指定只读取的 `sheet` 的index

> 注： 如 `setOnlyReadSheetName` 与 `setOnlyReadSheetIndex` 同时指定，则取并集

- getData

    使用该方法获取读取到的数据，可指定一个匿名回调函数来格式化每个单元格的数据。 回调函数的第一个参数为字段名（如未指定则使用列名），第二个参数为当前单元格的值， 第三个参数为当前单元格对象，第四个参数为当前 `PhpOffice\PhpSpreadsheet\Worksheet\Worksheet` 对象

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~1 days

Total

15

Last Release

1574d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a8e498d9a20e7987dfde7e0432061bb644c0cc0e55ab736a303cc2806de58e6?d=identicon)[biin2013](/maintainers/biin2013)

---

Top Contributors

[![biin2013](https://avatars.githubusercontent.com/u/16256411?v=4)](https://github.com/biin2013 "biin2013 (18 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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