PHPackages                             tdy/execl - 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. tdy/execl

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

tdy/execl
=========

PHP Execl增强处理

1.1(6y ago)125MITPHPPHP &gt;=5.3.0

Since Nov 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/731633799/execl-helper)[ Packagist](https://packagist.org/packages/tdy/execl)[ RSS](/packages/tdy-execl/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

DTY PHP EXECL 增强扩展
==================

[](#dty-php-execl-增强扩展)

### 使用方法

[](#使用方法)

`composer require tdy/execl`

`use Tdy\Execl\Import;`

`$filePath="execl表格.xlsx";`

```
 `$obj= new Import($filePath);  //实例对象
  $data=$obj->setField("a,b,c,d,e,f,g,h,i,j,k") //获取指定单元格
  ->setImagePath(true)  //设置获取图片资源路径
  ->setThead_row(1)     //指定表头行数
  ->setMax_row(2)       //指定读取数据行数
  ->setFieldAlias(['a'=>'name',"b"=>"description",'c'=>"meta_title","d"=>'price']) //字段别名
  ->getData();`  //获取的数据

```

SET方法
-----

[](#set方法)

### 设置读取最大列记录 eg：a到z

[](#设置读取最大列记录-ega到z)

`$obj->setMax_column("z");`

### 设置读取的最大行记录 eg:10 只读取10 行记录

[](#设置读取的最大行记录--eg10--只读取10-行记录)

`$obj->setMax_row(10);`

### 设置读取指定的列字段

[](#设置读取指定的列字段)

`$obj->setField("a,b,c,d,e,f,g,z"); `

### 设置列字段别名

[](#设置列字段别名)

` $obj->setFieldAlias(['a'=>'field1',"b"=>"field2",'e'=>"field3"]);`

### 设置表头所占行数

[](#设置表头所占行数)

`$obj->setThead_row(2)`

### 设置execl图片路径 参数为true：获取资源路径 参数为具体路径时：返回本地保存后的路径

[](#设置execl图片路径-参数为true获取资源路径--参数为具体路径时返回本地保存后的路径)

`$obj->setImagePath(true)`

GET 方法
------

[](#get-方法)

### 获取隐藏的列字段

[](#获取隐藏的列字段)

`$obj->hide_column;  `

### 获取表头数据

[](#获取表头数据)

`$obj->$thead_data;`

### 获取图片资源

[](#获取图片资源)

`$obj->imageData`

### 获取数据 可选参数 $title,$therd,$hide\_column

[](#获取数据--可选参数-titletherdhide_column)

` $obj->getData();`

```
     (
         [0] => Array
             (
                 [0] => Array
                     (
                         [name] => 产品名称
                         [description] => 同轮播图
                         [meta_title] => 同标题
                         [price] => 5.5
                         [category] => BEACH CANVAS BAG
                         [type] => 82% polyester 18% spandex
                         [pic] => Array
                             (
                                 [0] => Array
                                     (
                                         [file] => zip://E:\wamp\www\CMS\opencart\image\catalog\execl\Book1.xlsx#xl/media/image1.jpeg
                                         [title] => 主图
                                     )

                                 [1] => Array
                                     (
                                         [file] => zip://E:\wamp\www\CMS\opencart\image\catalog\execl\Book1.xlsx#xl/media/image2.jpeg
                                         [title] =>
                                     )

                             )

                         [banner] => Array
                             (
                                 [0] => Array
                                     (
                                         [file] => zip://E:\wamp\www\CMS\opencart\image\catalog\execl\Book1.xlsx#xl/media/image2.jpeg
                                         [title] => 图片xxxxxxx
                                     )

                                 [1] => Array
                                     (
                                         [file] => zip://E:\wamp\www\CMS\opencart\image\catalog\execl\Book1.xlsx#xl/media/image1.jpeg
                                         [title] => 图片二
                                     )

                             )

                         [seo_title] => 同标题
                         [color] => Blue,green,white,yellow
                         [size] => S,M,L
                     )

             )

     )

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

2258d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e541f544127f09c598d55333c5fbac0df925e0c696f073444c5779eec73ffc1?d=identicon)[doubley](/maintainers/doubley)

---

Top Contributors

[![731633799](https://avatars.githubusercontent.com/u/22770888?v=4)](https://github.com/731633799 "731633799 (6 commits)")

---

Tags

helperTdYDoubleYExeclphpExecl

### Embed Badge

![Health badge](/badges/tdy-execl/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[bryanjhv/slim-session

Session middleware and helper for Slim framework 4.

233961.5k16](/packages/bryanjhv-slim-session)[laravelista/ekko

Framework agnostic PHP package for marking navigation items active.

278673.4k4](/packages/laravelista-ekko)[beste/json

A simple JSON helper to decode and encode JSON

4222.7M3](/packages/beste-json)[chillerlan/php-settings-container

A container class for immutable settings objects. Not a DI container.

3427.3M21](/packages/chillerlan-php-settings-container)[kartik-v/yii2-helpers

A collection of useful helper functions for Yii Framework 2.0

883.0M29](/packages/kartik-v-yii2-helpers)

PHPackages © 2026

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