PHPackages                             icircle/docx-template-in-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. icircle/docx-template-in-php

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

icircle/docx-template-in-php
============================

Create Templates in MS Word docx format and use them Creating Business documents using PHP

v0.1.3(6y ago)4422.8k17[3 issues](https://github.com/iCircle/docxTemplateInPHP/issues)Apache License 2.0PHPPHP &gt;=5.3.0CI failing

Since Apr 1Pushed 3y ago6 watchersCompare

[ Source](https://github.com/iCircle/docxTemplateInPHP)[ Packagist](https://packagist.org/packages/icircle/docx-template-in-php)[ Docs](https://github.com/Raaghu1987/docxTemplateInPHP)[ RSS](/packages/icircle-docx-template-in-php/feed)WikiDiscussions master Synced today

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

docxTemplateInPHP
=================

[](#docxtemplateinphp)

Create Templates in MS Word docx format and use them Creating Business documents using PHP

What's New
----------

[](#whats-new)

Changed the namespace of `DocxTemplate` from default to `icircle\Template\Docx`

Introduction
------------

[](#introduction)

This library merges the data in php array into docx file.

The template docx file can be created in MS Word, To specify keys use \[key\] format in MS Word (i.e, specify the array indices inside the square bracket)

### Example

[](#example)

for the data

```
{
    "host":{
        "name":"Host Company",
        "address":"1st Main, 2nd Cross, Bangalore"
    }
}
```

the possible keys are \[host.name\] \[host.address\]

Basic Usage
-----------

[](#basic-usage)

```
use icircle\Template\Docx\DocxTemplate;

$docxTemplate = new DocxTemplate('path/to/template/file');
$dataArray = array() // fill the $dataArray with data
$docxTemplate->merge($dataArray,'path/to/output/file');
```

For More Usage please see the included tests or contact me

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Every ~531 days

Total

4

Last Release

2516d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92306cd4ec1342daeba6fb633880eb9907cdd022874ae39be11ab7ae274171c7?d=identicon)[Raaghu](/maintainers/Raaghu)

---

Top Contributors

[![Raaghu](https://avatars.githubusercontent.com/u/8255650?v=4)](https://github.com/Raaghu "Raaghu (5 commits)")[![Hsong1227](https://avatars.githubusercontent.com/u/31984622?v=4)](https://github.com/Hsong1227 "Hsong1227 (1 commits)")[![iandreyev](https://avatars.githubusercontent.com/u/555141?v=4)](https://github.com/iandreyev "iandreyev (1 commits)")[![mmskazak](https://avatars.githubusercontent.com/u/9865725?v=4)](https://github.com/mmskazak "mmskazak (1 commits)")

---

Tags

doctemplatedocxrtfgridmergetabledocumentmerge list

### Embed Badge

![Health badge](/badges/icircle-docx-template-in-php/health.svg)

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

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.6k39.0M235](/packages/phpoffice-phpword)[anourvalar/office

Generate documents from existing Excel &amp; Word templates | Export tables to Excel (Grids)

24095.2k](/packages/anourvalar-office)

PHPackages © 2026

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