PHPackages                             adnzaki/excel-creator - 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. adnzaki/excel-creator

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

adnzaki/excel-creator
=====================

A PHPOffice Spreadsheet simplifier

2.0.1(5mo ago)0522MITPHPPHP ^8.1 || ^8.2 || ^8.3

Since Mar 10Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/adnzaki/ExcelCreator)[ Packagist](https://packagist.org/packages/adnzaki/excel-creator)[ Docs](https://github.com/adnzaki/ExcelCreator)[ RSS](/packages/adnzaki-excel-creator/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

ExcelCreator
============

[](#excelcreator)

### *A simple and elegant way to work with PHPSpreadsheet*

[](#a-simple-and-elegant-way-to-work-with-phpspreadsheet)

Introduction
------------

[](#introduction)

**ExcelCreator** is a modern wrapper around PHPSpreadsheet that simplifies the most commonly used tasks in reading and writing Excel files. It provides two main classes: `Writer` for creating and formatting spreadsheets, and `Reader` for loading and reading spreadsheet content.

Installation
------------

[](#installation)

Install ExcelCreator using [Composer](https://getcomposer.org/):

### With existing `composer.json`

[](#with-existing-composerjson)

```
{
    "require": {
        "adnzaki/excel-creator": "^2.0.1"
    }
}
```

Then run:

```
composer update
```

### Without `composer.json`

[](#without-composerjson)

```
composer require adnzaki/excel-creator
```

Install the Latest Source Code
------------------------------

[](#install-the-latest-source-code)

If you prefer the latest development version:

```
{
    "require": {
        "adnzaki/excel-creator": "dev-main"
    }
}
```

Then run `composer update`.

Usage
-----

[](#usage)

This library provides two main classes under the namespace `ExcelTools`:

### 📝 Writing Excel Files with `Writer`

[](#-writing-excel-files-with-writer)

```
use ExcelTools\Writer;

$excel = new Writer();
```

- Saving file to browser:

```
$excel->save('hello_world.xlsx');
```

- Apply styles to cell range:

```
$style = [
    'font' => [
        'name' => 'Arial',
        'size' => 10,
    ],
    'borders' => [
        'allBorders' => [
            'borderStyle' => $excel->border::BORDER_THIN,
            'color' => ['argb' => $excel->color::COLOR_BLACK],
        ],
    ]
];
$excel->applyStyle($style, 'A2:D10');
```

- Fill data:

```
$data = [
    ['Name', 'City'],
    ['Zaki', 'Jakarta'],
    ['Dien', 'Bojonegoro']
];
$excel->fillCell($data, 'A1');
```

- Text wrapping:

```
$excel->wrapText('B5');
```

- Merge &amp; unmerge:

```
$excel->mergeCells('A1:B1');
$excel->unmergeCells('A1:B1');
```

- Column widths:

```
$excel->setColumnWidth('A', 20);
$excel->setMultipleColumnsWidth(['B', 'C'], 25);
$excel->setDefaultColumnWidth(15);
```

- Row heights:

```
$excel->setRowHeight(3, 25);
$excel->setMultipleRowsHeight(['1' => 40, '3-5' => 25]);
$excel->setDefaultRowHeight(20);
```

- Set default font:

```
$excel->setDefaultFont('Calibri', 11);
```

---

### 📖 Reading Excel Files with `Reader`

[](#-reading-excel-files-with-reader)

```
use ExcelTools\Reader;

$reader = new Reader();
$reader->loadFromFile('SampleFile.xlsx');
```

- Get all data from the active sheet:

```
$data = $reader->getSheetData(true); // true = first row as headers
print_r($data);
```

- Get sheet names:

```
$sheetNames = $reader->getSheetNames();
```

- Switch to another sheet:

```
$reader->setActiveSheet('Sheet2');
```

License
-------

[](#license)

MIT

Author
------

[](#author)

Adnan Zaki –

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance70

Regular maintenance activity

Popularity10

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

Total

5

Last Release

173d ago

Major Versions

1.0.2 → 2.0.02025-07-15

PHP version history (2 changes)1.0.0PHP ^7.4 || ^8.0

2.0.0PHP ^8.1 || ^8.2 || ^8.3

### Community

Maintainers

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

---

Top Contributors

[![adnzaki](https://avatars.githubusercontent.com/u/24837286?v=4)](https://github.com/adnzaki "adnzaki (29 commits)")

### Embed Badge

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

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

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

982.5M38](/packages/in2code-powermail)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

44763.4k2](/packages/pimcore-data-importer)[portphp/spreadsheet

PhpSpreadsheet reader and writer for Port

14796.4k4](/packages/portphp-spreadsheet)

PHPackages © 2026

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