PHPackages                             anmoroz/xlsx-template-php - 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. [Templating &amp; Views](/categories/templating)
4. /
5. anmoroz/xlsx-template-php

ActiveLibrary[Templating &amp; Views](/categories/templating)

anmoroz/xlsx-template-php
=========================

A library for templating of Excel Office documents. Supports MS Excel xlsx. Uses PHPSpreadsheet library.

162428[2 issues](https://github.com/anmoroz/xlsx-template-php/issues)PHPCI failing

Since Oct 16Pushed 6y ago3 watchersCompare

[ Source](https://github.com/anmoroz/xlsx-template-php)[ Packagist](https://packagist.org/packages/anmoroz/xlsx-template-php)[ RSS](/packages/anmoroz-xlsx-template-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

xlsx-template-php
=================

[](#xlsx-template-php)

A library for templating of Excel Office documents. Supports MS Excel xlsx. Uses PhpSpreadsheet library.

Not only large documents.

An example
----------

[](#an-example)

#### Input template

[](#input-template)

[![waybill_template](https://camo.githubusercontent.com/47d720f30f281e88badaad9a9b9dcffe9c08eb7f40fc58c26e4951c5e1c1ed44/68747470733a2f2f7261772e6769746875622e636f6d2f616e6d6f726f7a2f586c737854656d706c6174655048502f6d61737465722f64656d6f2f77617962696c6c5f74656d706c6174652e6a7067)](https://camo.githubusercontent.com/47d720f30f281e88badaad9a9b9dcffe9c08eb7f40fc58c26e4951c5e1c1ed44/68747470733a2f2f7261772e6769746875622e636f6d2f616e6d6f726f7a2f586c737854656d706c6174655048502f6d61737465722f64656d6f2f77617962696c6c5f74656d706c6174652e6a7067)

#### Some code

[](#some-code)

```
$templator = new Templator($templateFile, $outputDir, 'document.xlsx');

$settings = new Settings([
    'providerName' => 'ИП Сумкин Ф.Ф.',
    'clientName' => 'ООО "Рога и копыта"',
    'docNumber' => 5485,
    'docDate' => date('d.m.Y'),
    'totalProductAmount' => 4,
    'totalProductSum' => 2000,
]);

$loopData = new LoopData();
$loopData->setMap([
    'productName',
    'productArticle',
    'productUnit',
    'productAmount',
    'productPrice',
    'productSum',
]);
$loopData->setSource([
   ['Стол письменный', 'СП-234', 'шт.', 1, 1500, 1500],
   ['Чернильница', '75332', 'шт.', 2, 200, 400],
   ['Лампа настольная 12Вт', '6454', 'шт.', 1, 100, 100],
]);
$settings->addLoop(1, $loopData);

$templator->render($settings);
$templator->save();
```

#### Output document

[](#output-document)

[![document](https://camo.githubusercontent.com/0d21ba79b3634486ca76f405421f30bd4c51f1c871629b400ffaf7772affd1c9/68747470733a2f2f7261772e6769746875622e636f6d2f616e6d6f726f7a2f586c737854656d706c6174655048502f6d61737465722f64656d6f2f646f63756d656e742e6a7067)](https://camo.githubusercontent.com/0d21ba79b3634486ca76f405421f30bd4c51f1c871629b400ffaf7772affd1c9/68747470733a2f2f7261772e6769746875622e636f6d2f616e6d6f726f7a2f586c737854656d706c6174655048502f6d61737465722f64656d6f2f646f63756d656e742e6a7067)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 87.5% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b73aa7a7002f3832e23f73834d8e90592875035b5ea890bdf30f1264bc2d6e6?d=identicon)[anmoroz](/maintainers/anmoroz)

---

Top Contributors

[![anmoroz](https://avatars.githubusercontent.com/u/6552104?v=4)](https://github.com/anmoroz "anmoroz (7 commits)")[![NaxAll](https://avatars.githubusercontent.com/u/2611619?v=4)](https://github.com/NaxAll "NaxAll (1 commits)")

### Embed Badge

![Health badge](/badges/anmoroz-xlsx-template-php/health.svg)

```
[![Health](https://phpackages.com/badges/anmoroz-xlsx-template-php/health.svg)](https://phpackages.com/packages/anmoroz-xlsx-template-php)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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