PHPackages                             ligne/xls-generator - 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. ligne/xls-generator

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

ligne/xls-generator
===================

XLS generator from array

1.3.2(6y ago)47MITPHPPHP &gt;=7.1

Since Sep 3Pushed 6y agoCompare

[ Source](https://github.com/itsalb3rt/Ligne_xlsGenerator)[ Packagist](https://packagist.org/packages/ligne/xls-generator)[ RSS](/packages/ligne-xls-generator/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

XLSGenerator
============

[](#xlsgenerator)

Es una clase generadora de archivos XLS a partir de una matriz asociativa unidimensional, esto tiene la flexibilidad de poder utilizarse no solo para descargar archivos si no también para presentar tablas de datos.

### Instalación 🚀

[](#instalación-)

```
$ composer require ligne/xls-generator
```

### Usos 📚

[](#usos-)

**Para el ejemplo usaremos este array de 5 usuarios.**

```
$array = array(
    0 =>
    array(
        'id' => 1,
        'name' => 'Leanne Graham',
        'username' => 'Bret',
        'email' => 'Sincere@april.biz',
        'phone' => '1-770-736-8031 x56442',
        'website' => 'hildegard.org',
    ),
    1 =>
    array(
        'id' => 2,
        'name' => 'Ervin Howell',
        'username' => 'Antonette',
        'email' => 'Shanna@melissa.tv',
        'phone' => '010-692-6593 x09125',
        'website' => 'anastasia.net',
    ),
    2 =>
    array(
        'id' => 3,
        'name' => 'Clementine Bauch',
        'username' => 'Samantha',
        'email' => 'Nathan@yesenia.net',
        'phone' => '1-463-123-4447',
        'website' => 'ramiro.info',
    ),
    3 =>
    array(
        'id' => 4,
        'name' => 'Patricia Lebsack',
        'username' => 'Karianne',
        'email' => 'Julianne.OConner@kory.org',
        'phone' => '493-170-9623 x156',
        'website' => 'kale.biz',
    ),
    4 =>
    array(
        'id' => 5,
        'name' => 'Chelsey Dietrich',
        'username' => 'Kamren',
        'email' => 'Lucio_Hettinger@annie.ca',
        'phone' => '(254)954-1289',
        'website' => 'demarco.info',
    ),
    5 =>
    array(
        'id' => 6,
        'name' => 'Mrs. Dennis Schulist',
        'username' => 'Leopoldo_Corkery',
        'email' => 'Karley_Dach@jasper.info',
        'phone' => '1-477-935-8478 x6430',
        'website' => 'ola.org',
    )
);
```

**Uso basico:**

```
use Ligne\XlsGenerator;
//...
$xls = new XlsGenerator($array);
 var_dump($xls->getXls());
```

**Resultado 👓**

[![](https://camo.githubusercontent.com/d1903035223c9076dee27039c88fd844193b806a4dac58b93935fb9a580db5fd/68747470733a2f2f692e696d6775722e636f6d2f3948424970756a2e706e67)](https://i.imgur.com/9HBIpuj.png)

**Opciones; ⚙**

El constructor de la clase también recibe ciertas opciones que te permiten decidir que obtener;

`array $content: `Arreglo asociativa unidimensional

`array $omit_fields = array():` Arreglo con nombres de campos que requiera omitir,

`bool $downloable = false:` Si se desea que se descargue como archivo xls

`bool $hasHeader = true: `Si tiene encabezados para incluirlos (Estos son los indices de la del arreglo)

**Ejemplo:**

En este ejemplo omitiremos el campo `phone`

```
$xls = new XlsGenerator($array,['phone'],false,true);
var_dump($xls->getXls());
```

**Resultado 👓**

[![](https://camo.githubusercontent.com/323f875a3b20106bb25dec42c2517f02e887841e9f434dfd83f422880ac259c5/68747470733a2f2f692e696d6775722e636f6d2f6e38725a317a342e706e67)](https://i.imgur.com/n8rZ1z4.png)

Cualquier sugerencia siempre es bien recibida.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

2441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65c39423671092943b26551332058b25a86132fccb9506be9798db2a0d72353b?d=identicon)[ligne](/maintainers/ligne)

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

---

Top Contributors

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

---

Tags

classlignephpxls

### Embed Badge

![Health badge](/badges/ligne-xls-generator/health.svg)

```
[![Health](https://phpackages.com/badges/ligne-xls-generator/health.svg)](https://phpackages.com/packages/ligne-xls-generator)
```

###  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.8M124](/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)
