PHPackages                             yakub/yxel - 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. yakub/yxel

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

yakub/yxel
==========

This class help read and create new csv/xlsx files. Optimized for simple but big spreadsheet.

v1.2(5y ago)037Apache-2.0PHPPHP ^7.1CI failing

Since Jun 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Yakubko/yxel)[ Packagist](https://packagist.org/packages/yakub/yxel)[ RSS](/packages/yakub-yxel/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

yxel
====

[](#yxel)

> This class help read and create new csv/xlsx files. Optimized for simple but big spreadsheet.

**Build status**

master: [![Build Status](https://camo.githubusercontent.com/072c3525de047a3b286f009d3574922950a6965404f0ff61e69e2c671f3ba703/68747470733a2f2f7472617669732d63692e636f6d2f59616b75626b6f2f7978656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Yakubko/yxel)[![Coverage Status](https://camo.githubusercontent.com/9e70e7efac2125ca21e4cf73ea078f89440dbf0e8b4719e2cd89a7cf4e0b417b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f59616b75626b6f2f7978656c2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Yakubko/yxel?branch=master)

dev: [![Build Status](https://camo.githubusercontent.com/4ea207fb0e08980e83cb1b349f1e3fade10baba0ff4ee14ea2e72f18de3b558b/68747470733a2f2f7472617669732d63692e636f6d2f59616b75626b6f2f7978656c2e7376673f6272616e63683d646576)](https://travis-ci.com/Yakubko/yxel)[![Coverage Status](https://camo.githubusercontent.com/1b7a5f7d60629898c0bc033dda761875df049d28555ccc09015604764b6d8f9f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f59616b75626b6f2f7978656c2f62616467652e7376673f6272616e63683d646576)](https://coveralls.io/github/Yakubko/yxel?branch=dev)

- [Install](#install)
- [Settings](#settings)
- [CSV](#csv)
    - [Read](#read-csv-file)
    - [Create](#create-csv-file)
- [XLSX](#xlsx)
    - [Read](#read-xlsx-file)
    - [Create](#create-xlsx-file)
- [Batch usage](#batch-usage)

Install
-------

[](#install)

The recommended way to install is via Composer:

```
composer require yakub/yxel

```

Settings
--------

[](#settings)

Class use tmp dir for create new files or read xlsx files. Path can be changed but script must have permissions for write in that folder.

```
\Yakub\Yxel\Main::setCreatingDir('/my/path/to/creating');
```

CSV
---

[](#csv)

Simple work with csv file where is auto detection for separator between cells

### Read csv file

[](#read-csv-file)

```
$read = \Yakub\Yxel\Main::read('path/to/file.csv');

$read->getRows(function ($data, $row) {
	echo $row.' -> '.json_encode($data).'';
});
```

### Create csv file

[](#create-csv-file)

```
$write = \Yakub\Yxel\Main::write('yxel_test', \Yakub\Yxel\Main::CSV);

$write->addRow(['A1', 'B1', '']);
$write->addRow(['A2', '', 'C2']);

$write->close();

// Return full path to file
$patToFile = $write->getFilePath();
```

XLSX
----

[](#xlsx)

Simple work with xlsx file where is readed only first sheet

### Read xlsx file

[](#read-xlsx-file)

```
$read = \Yakub\Yxel\Main::read('path/to/file.xlsx');

$read->getRows(function ($data, $row) {
	echo $row.' -> '.json_encode($data).'';
});
```

### Create xlsx file

[](#create-xlsx-file)

```
$write = \Yakub\Yxel\Main::write('yxel_test', \Yakub\Yxel\Main::XLSX);

$write->addRow(['A1', 'B1', '']);
$write->addRow(['A2', '', 'C2']);

$write->close();

// Return full path to file
$patToFile = $write->getFilePath();
```

Batch usage
-----------

[](#batch-usage)

Writing can be stopped and resumed later or in another process

```
$write = \Yakub\Yxel\Main::write('yxel_test', \Yakub\Yxel\Main::CSV);

$write->addRow(['A1', 'B1', '']);
$write->addRow(['A2', '', 'C2']);

// Instead of close use save. This function only save new data but file is still able to get new rows. Also this help clean memory.
// After save script can end and data will not be lost
$write->save();
```

In other process just open existing file

```
// Name of file must be same
$write = \Yakub\Yxel\Main::write('yxel_test', \Yakub\Yxel\Main::CSV);

// Add new row to previous in this file
$write->addRow(['', 'B3', 'C3']);

// After close can't open this file again. If is used same name then file will be rewrited with new data
$write->close();
```

To cominication between processes can use storage for custom data

```
$write = \Yakub\Yxel\Main::write('yxel_test', \Yakub\Yxel\Main::CSV);

$write->addRow(['A1', 'B1', '']);
$write->addRow(['A2', '', 'C2']);

$write->settings('row_number', 3);
$write->save();

// ------- New process ------- //

$write = \Yakub\Yxel\Main::write('yxel_test', \Yakub\Yxel\Main::CSV);
$row = $write->settings('row_number');

$write->addRow(['', 'B'.$row, 'C'.$row]);

$write->close();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

3

Last Release

2025d ago

PHP version history (2 changes)v1.0PHP &gt;=5.3.0

v1.1PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/40a2625995db40abc7bd3633dff05225a9a2cefb4c68ddd1d95246fb2c1efb27?d=identicon)[yakubmiskech@gmail.com](/maintainers/yakubmiskech@gmail.com)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yakub-yxel/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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