PHPackages                             yidas/phpexcel-helper - 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. yidas/phpexcel-helper

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

yidas/phpexcel-helper
=====================

Creating Excel with easy and artistic way based on PHPExcel

1.3.1(8y ago)24.3k↓50%2MITPHP

Since Dec 3Pushed 8y ago2 watchersCompare

[ Source](https://github.com/yidas/phpexcel-helper)[ Packagist](https://packagist.org/packages/yidas/phpexcel-helper)[ Docs](https://github.com/yidas/phpexcel-helper)[ RSS](/packages/yidas-phpexcel-helper/feed)WikiDiscussions master Synced 1mo ago

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

PHPExcel Helper
===============

[](#phpexcel-helper)

Creating Excel with easy and artistic way based on PHPExcel

[![Latest Stable Version](https://camo.githubusercontent.com/78143d6517296ad91e167b47481d6f96d7d4eae98853e513a6e82727866b74a5/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f706870657863656c2d68656c7065722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/phpexcel-helper)[![Latest Unstable Version](https://camo.githubusercontent.com/9971d0e61dba3193f63db3b307e4491e17d7e6657c32c7d6422f1789b261a4a7/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f706870657863656c2d68656c7065722f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/phpexcel-helper)[![License](https://camo.githubusercontent.com/15f4ef7c8c7c21ee510a1ba5780fe22971119abb2958e217b72242d0105c291e/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f706870657863656c2d68656c7065722f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/phpexcel-helper)

[PHPExcel](https://github.com/PHPOffice/PHPExcel/blob/1.8/Classes/PHPExcel/Worksheet.php) is no longer maintained and should not be used anymore.

You should migrate to this library's successor [yidas/phpspreadsheet-helper](https://github.com/yidas/phpspreadsheet-helper).

---

OUTLINE
-------

[](#outline)

- [DEMONSTRATION](#demonstration)
- [INSTALLATION](#installation)
- [USAGE](#usage)

    - [Merge Cells](#merge-cells)
    - [PHPExcel &amp; Sheet Object](#phpexcel--sheet-object)
    - [Multiple Sheets](#multiple-sheets)
    - [Map of Coordinates &amp; Ranges](#multiple-sheets)
    - [Cells Format](#cells-format)

---

DEMONSTRATION
-------------

[](#demonstration)

```
\PHPExcelHelper::newExcel()
    ->addRow(['ID', 'Name', 'Email'])
    ->addRows([
        ['1', 'Nick','myintaer@gmail.com'],
        ['2', 'Eric','eric@.....'],
    ])
    ->output('My Excel');
```

---

INSTALLATION
------------

[](#installation)

Run Composer in your project:

```
composer require yidas/phpexcel-helper

```

Then you could call it after Composer is loaded depended on your PHP framework:

```
require __DIR__ . '/vendor/autoload.php';

\PHPExcelHelper::newExcel();
```

---

USAGE
-----

[](#usage)

### Merge Cells

[](#merge-cells)

```
\PHPExcelHelper::newExcel()
    ->addRows([
        [['value'=>'SN', 'row'=>2], ['value'=>'Language', 'col'=>2], ['value'=>'Block', 'row'=>2, 'col'=>2]],
        ['','English','繁體中文',['skip'=>2]],
    ])
    ->addRows([
        ['1', 'Computer','電腦','#15'],
        ['2', 'Phone','手機','#4','#62'],
    ])
    ->output('Merged Excel');
```

### PHPExcel &amp; Sheet Object

[](#phpexcel--sheet-object)

```
// Get a new PHPExcel object
$objPHPExcel = new \PHPExcel;
$objPHPExcel->getProperties()
    ->setCreator("Nick Tsai")
    ->setTitle("Office 2007 XLSX Document");
// Get the actived sheet object
$objPHPExcelSheet = $objPHPExcel->setActiveSheetIndex(0);
$objPHPExcelSheet->setTitle('Sheet');
$objPHPExcelSheet->setCellValue('A1', 'SN');
// Inject PHPExcel Object and Sheet Object to Helper
\PHPExcelHelper::newExcel($objPHPExcel)
    ->setSheet($objPHPExcelSheet)
    ->setRowOffset(1) // Point to 1nd row from 0
    ->addRows([
        ['1'],
        ['2'],
    ]);

\PHPExcelHelper::output();
```

```
\PHPExcelHelper::newExcel()
    ->setSheet(0, 'Sheet')
    ->addRow(['SN']);
// Get the PHPExcel object created by Helper
$objPHPExcel = \PHPExcelHelper::getExcel();
$objPHPExcel->getProperties()
    ->setCreator("Nick Tsai")
    ->setTitle("Office 2007 XLSX Document");
// Get the actived sheet object created by Helper
$objPHPExcelSheet = \PHPExcelHelper::getSheet();
$objPHPExcelSheet->setCellValue('A2', '1');
$objPHPExcelSheet->setCellValue('A3', '2');

\PHPExcelHelper::output();
```

### Multiple Sheets

[](#multiple-sheets)

```
\PHPExcelHelper::newExcel()
    ->setSheet(3, '4nd Sheet')
    ->addRow(['ID', 'Name'])
    ->addRows([
        ['1', 'Nick'],
    ]);
// Set another sheet object and switch to it
\PHPExcelHelper::setSheet(1, '2nd Sheet')
    ->addRow(['SN', 'Title'])
    ->addRows([
        ['1', 'Foo'],
    ]);

\PHPExcelHelper::output('MultiSheets');
```

### Map of Coordinates &amp; Ranges

[](#map-of-coordinates--ranges)

```
\PHPExcelHelper::newExcel()
    ->addRows([
        [
            ['value'=>'SN', 'row'=>2, 'key'=>'sn'],
            ['value'=>'Language', 'col'=>2, 'key'=>'lang'],
            ['value'=>'Block', 'row'=>2, 'col'=>2, 'key'=>'block'],
        ],
        [
            '',
            ['value'=>'English', 'key'=>'lang-en'],
            ['value'=>'繁體中文', 'key'=>'lang-zh'],
            ['skip'=>2, 'key'=>'block-skip'],
        ],
    ])
    ->addRows([
        ['1', 'Computer','電腦','#15'],
        ['2', 'Phone','手機','#4','#62'],
    ]);
// ->output('Merged Excel');

print_r(\PHPExcelHelper::getCoordinateMap());
print_r(\PHPExcelHelper::getRangeMap());
// print_r(\PHPExcelHelper::getColumnMap());
// print_r(\PHPExcelHelper::getRowMap());
echo "sn start cell: ". \PHPExcelHelper::getCoordinateMap('sn');
echo "\nsn start column: ". \PHPExcelHelper::getColumnMap('sn');
echo "\nsn start row: ". \PHPExcelHelper::getRowMap('sn');
echo "\nsn range: ". \PHPExcelHelper::getRangeMap('sn');
echo "\nAll range: ". \PHPExcelHelper::getRangeAll();
```

The result could be:

```
Array
(
    [sn] => A1
    [lang] => B1
    [block] => D1
    [lang-en] => B2
    [lang-zh] => C2
    [block-skip] => D2
)
Array
(
    [sn] => A1:A2
    [lang] => B1:C1
    [block] => D1:E2
    [lang-en] => B2:B2
    [lang-zh] => C2:C2
    [block-skip] => D2:E2
)
sn start cell: A1
sn start column: A
sn start row: 1
sn range: A1:A2
All range: A1:E4

```

### Cells Format

[](#cells-format)

- setWrapText(): Set to all cells by default
- setAutoSize(): Set to all cells(columns) by default

```
\PHPExcelHelper::newExcel()
    ->addRow(['Title', 'Content'])
    ->addRows([
        ['Basic Plan', "*Interface\n*Search Tool"],
        ['Advanced Plan', "*Interface\n*Search Tool\n*Statistics"],
    ])
    ->setWrapText()
    // ->setWrapText('B2')
    ->setAutoSize()
    // ->setAutoSize('B')
    ->output('Formatted Excel');
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

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

Total

6

Last Release

3023d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b30d2b2c0b53aef65fad4af56cd3c7912d3db2b612890c706fe79448717f6aba?d=identicon)[yidas](/maintainers/yidas)

---

Top Contributors

[![yidas](https://avatars.githubusercontent.com/u/12604195?v=4)](https://github.com/yidas "yidas (8 commits)")

---

Tags

phpexcelphpexcel-helpersheetphpexcelPHPExcelsheetphpexcel helper

### Embed Badge

![Health badge](/badges/yidas-phpexcel-helper/health.svg)

```
[![Health](https://phpackages.com/badges/yidas-phpexcel-helper/health.svg)](https://phpackages.com/packages/yidas-phpexcel-helper)
```

###  Alternatives

[yidas/phpspreadsheet-helper

PHP Excel Helper - Write and read Spreadsheet with easy way based on PhpSpreadsheet

383144.5k3](/packages/yidas-phpspreadsheet-helper)[avadim/fast-excel-writer

Lightweight and very fast XLSX Excel Spreadsheet Writer in PHP

2951.2M7](/packages/avadim-fast-excel-writer)[avadim/fast-excel-reader

Lightweight and very fast XLSX Excel Spreadsheet Reader in PHP

104608.4k6](/packages/avadim-fast-excel-reader)

PHPackages © 2026

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