PHPackages                             kebacorp/arrayexcelbuilder - 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. kebacorp/arrayexcelbuilder

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

kebacorp/arrayexcelbuilder
==========================

The extension creates an Excel file from the data array.

v4.2.0(2y ago)126.1k↑85.2%1[1 PRs](https://github.com/KebaCorp/ArrayExcelBuilder/pulls)BSD-3-ClausePHPPHP ^5.6|^7.0|^8.0

Since Dec 16Pushed 2y ago2 watchersCompare

[ Source](https://github.com/KebaCorp/ArrayExcelBuilder)[ Packagist](https://packagist.org/packages/kebacorp/arrayexcelbuilder)[ Docs](https://github.com/KebaCorp/ArrayExcelBuilder)[ RSS](/packages/kebacorp-arrayexcelbuilder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (53)Used By (0)

 [ ![](https://avatars0.githubusercontent.com/u/29224726?s=400&u=ed586fe0e07d9d68d1594e0020d7e8e5fd2ac3d5&v=4) ](https://github.com/KebaCorp)

ArrayExcelBuilder
=================

[](#arrayexcelbuilder)

The component **CREATES** an Excel file from the data array or **READS** from Excel file to array.

> Based on [PHPOffice/PhpSpreadsheet](https://github.com/PHPOffice/PhpSpreadsheet)

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/af010b3aa4d4fe4f181829dfdd8391500afd41d2c313ee6f855da56de3e22376/68747470733a2f2f706f7365722e707567782e6f72672f6b656261636f72702f6172726179657863656c6275696c6465722f762f737461626c65)](https://packagist.org/packages/kebacorp/arrayexcelbuilder)[![Total Downloads](https://camo.githubusercontent.com/26233df520345970a760c77f2ca28f13938ca73b430975544e7e0e72315892bd/68747470733a2f2f706f7365722e707567782e6f72672f6b656261636f72702f6172726179657863656c6275696c6465722f646f776e6c6f616473)](https://packagist.org/packages/kebacorp/arrayexcelbuilder)

Requirements:
-------------

[](#requirements)

- PHP 5.6 and higher.
- PHP 7.4 is supported since ArrayExcelBuilder v4.0.1

Installation:
-------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist kebacorp/arrayexcelbuilder

```

or add

```
"kebacorp/arrayexcelbuilder": "*"

```

to the require section of your composer.json.

Usage:
------

[](#usage)

### "Hello world!" example

[](#hello-world-example)

```

```

### Matrix data example

[](#matrix-data-example)

```

```

### Sheet parameter "isRowDirection" example

[](#sheet-parameter-isrowdirection-example)

```

```

Рекомендации:
-------------

[](#рекомендации)

- Рекомендуется использовать глобальные параметры, вместо одинаковых параметров у каждой ячейки, если необходимо настроить все или большинство ячеек одинаково.
- Каждый параметр увеличивает время создания файла. Поэтому один параметр "styleArray" (массив с настройками стиля ячейки) будет исполняться существенно быстрее, чем аналогичные параметры (borderBottom, bold, fontColor, fontSize и т. д.) по отдельности.
- Не рекомендуется использовать в качестве ключей массивов колонок и строк не числа. Позиция следующей ячейки в таком случае может сбиться!

Полезно знать:
--------------

[](#полезно-знать)

- Позиция ячейки относительно ключа массива:

> Если массив с данными будет ассоциативным, и ключи будут в виде цифр, то ячейка будет расположена относительно ключа. Отсчет начинается с нуля.
>
> Например:

```
