PHPackages                             fdmsantos/exceltofiles - 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. fdmsantos/exceltofiles

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

fdmsantos/exceltofiles
======================

Simple library to create files by excel rows

v1.1(8y ago)09Apache-2.0PHP

Since Jan 8Pushed 8y agoCompare

[ Source](https://github.com/fdmsantos/exceltofiles)[ Packagist](https://packagist.org/packages/fdmsantos/exceltofiles)[ RSS](/packages/fdmsantos-exceltofiles/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Excel to files
==============

[](#excel-to-files)

`fdmsantos/exceltofiles` is a simple library to create files by excel row based on a template.

How To Use
----------

[](#how-to-use)

We need Give a Template File and The Excel File.

Template File Example:

```
Hello my name is [name].
I'm from [country] and have [age] years old!
```

Excel File Example:

ABCFabioPortugal31JohnSpain23PeterEngland65Code Example:

```
require_once('vendor/autoload.php');

use ExcelToFiles\ExcelToFiles;

$exceltoFiles = new ExcelToFiles([
  'template' => 'template.txt',
  'excel'    => 'excel.xls',
  'mapping'  => [
    '[name]' => 'A'
    '[country]' => 'B'
    '[age]' => 'C'
]);

$exceltoFiles->generate();
```

The result from code above will be :

File 1:

```
Hello my name is Fabio.
I'm from Portugal and have 31 years old!
```

File 2:

```
Hello my name is John.
I'm from Spain and have 23 years old!
```

File 3:

```
Hello my name is Peter.
I'm from England and have 65 years old!
```

Optional Params:

```
require_once('vendor/autoload.php');

use ExcelToFiles\ExcelToFiles;

$exceltoFiles = new ExcelToFiles([
  'template' => '{template.txt}',
  'excel'    => '{excel.xls}',
  'excludeRows' => [1,2,13], // To exclude Rows. This example wil exclude row 1, 2 and 13
  'filesname' => 'person_{A}.txt', // To define filename. The name can depends from excel row. For this it's necessary use {column}.
  'outputdir' => 'src/', // To choose files path. The Default is current path.
  'mapping'  => [
    '[name]' => 'A'
    '[country]' => 'B'
    '[age]' => 'C'
]);
```

Closures:

If the template variables have same logical or depends from two or more columns, we can use closures.

```
// One Clousure for Variable
$exceltoFiles->mapWithClosure('[name]',function($columns) {
	return $columns['A'].' => '.$columns['B'];
});

$exceltoFiles->generate();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3046d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

phpexcelfilesmap

### Embed Badge

![Health badge](/badges/fdmsantos-exceltofiles/health.svg)

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

###  Alternatives

[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)

PHPackages © 2026

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