PHPackages                             kartik-v/yii2-word-report - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kartik-v/yii2-word-report

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

kartik-v/yii2-word-report
=========================

Make reports in Yii2 with Microsoft Word Templates.

91.3k3[1 issues](https://github.com/kartik-v/yii2-word-report/issues)PHP

Since Feb 24Pushed 5y ago4 watchersCompare

[ Source](https://github.com/kartik-v/yii2-word-report)[ Packagist](https://packagist.org/packages/kartik-v/yii2-word-report)[ RSS](/packages/kartik-v-yii2-word-report/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 [ ![Krajee Logo](https://camo.githubusercontent.com/4addfbb3869c3fc7d79befea4f06d9cf3655a686fb503df0da1d725859cfdef9/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f6b72616a65652d6c6f676f2d622e706e67) ](http://demos.krajee.com "Krajee Demos")
 yii2-word-report ---

 [ ![Donate](https://camo.githubusercontent.com/4af77d425ca202e55ab3d711b438e238ded194735bc345a019ac060e03e26227/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67) ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal")
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-word-report--------------------)

[![Stable Version](https://camo.githubusercontent.com/3176cae65d3bdc42069ad1040126257578328b6647a0a470f00a3ee9c14371e1/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d776f72642d7265706f72742f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-word-report)[![Unstable Version](https://camo.githubusercontent.com/3308f63dcc6ab908f981c9074b65c0817f704b84c504abeec3dbd9cd7260e6ca/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d776f72642d7265706f72742f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-word-report)[![License](https://camo.githubusercontent.com/ad9f23c974b56b4cee136322a25937788d9e26cac51e72e9008b97a8078c4afb/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d776f72642d7265706f72742f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-word-report)

[![Total Downloads](https://camo.githubusercontent.com/4a51f7149139683b4e28744210c5f0c81ac89d9c6dc0d450f30550909947ba80/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d776f72642d7265706f72742f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-word-report)[![Monthly Downloads](https://camo.githubusercontent.com/ba7035a13431c630570572bbf3feb574d895b0883d5396d30998173e3e98755a/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d776f72642d7265706f72742f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-word-report)[![Daily Downloads](https://camo.githubusercontent.com/a2662105aec9f33207274338daaad1dab024f90e9a9aa50e51440c5129714e8a/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d776f72642d7265706f72742f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-word-report)

A Yii2 library to generate Word / PDF reports using Microsoft Word Templates.

Refer [detailed documentation](http://demos.krajee.com/word-report) and/or a [complete demo](http://demos.krajee.com/word-report-demo).

### Documentation and Demo

[](#documentation-and-demo)

You can see detailed [documentation](http://demos.krajee.com/word-report) and [demonstration](http://demos.krajee.com/word-report-demo) on usage of the extension.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

### Pre-requisites

[](#pre-requisites)

> Note: Check the [composer.json](https://github.com/kartik-v/yii2-dropdown-x/blob/master/composer.json) for this extension's requirements and dependencies. You must set the `minimum-stability` to `dev` in the **composer.json** file in your application root folder before installation of this extension OR if your `minimum-stability` is set to any other value other than `dev`, then set the following in the require section of your composer.json file

```
kartik-v/yii2-word-report: "@dev"

```

Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

### Install

[](#install)

Either run

```
$ php composer.phar require kartik-v/yii2-word-report "@dev"

```

or add

```
"kartik-v/yii2-word-report": "@dev"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

```
use kartik\wordreport\TemplateReport;

$report = new TemplateReport([
   'format' => TemplateReport::FORMAT_BOTH,
   'inputFile' => 'Invoice_Template_01.docx',
   'outputFile' => 'Invoice_Report_' . date('Y-m-d'),
   'values' => ['invoice_no' => 2001, 'invoice_date' => '2020-02-21'],
   'images' => ['company_logo' => '@webroot/images/company.jpg', 'customer_logo' => '@webroot/images/company.jpg'],
   'rows' => [
     'item' => [
         ['item' => 1, 'name' => 'Potato', 'price' => '$10.00'],
         ['item' => 2, 'name' => 'Tomato', 'price' => '$20.00'],
     ]
   ],
   'blocks' => [
     'customer_block' => [
         ['customer_name' => 'John', 'customer_address' => 'Address for John'],
         ['customer_name' => 'Bill', 'customer_address' => 'Address for Bill'],
     ],
   ]
]);
// Generate the report
$report->generate();
```

License
-------

[](#license)

**yii2-word-report** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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://avatars.githubusercontent.com/u/3592619?v=4)[Kartik Visweswaran](/maintainers/kartik-v)[@kartik-v](https://github.com/kartik-v)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (4 commits)")[![thtmorais](https://avatars.githubusercontent.com/u/18515639?v=4)](https://github.com/thtmorais "thtmorais (1 commits)")

### Embed Badge

![Health badge](/badges/kartik-v-yii2-word-report/health.svg)

```
[![Health](https://phpackages.com/badges/kartik-v-yii2-word-report/health.svg)](https://phpackages.com/packages/kartik-v-yii2-word-report)
```

###  Alternatives

[tailpress/tailpress

The Tailwind CSS powered WordPress boilerplate theme.

1.4k2.9k](/packages/tailpress-tailpress)[nerds-and-company/schematic

Craft setup and sync tool

13654.4k1](/packages/nerds-and-company-schematic)[mmikkel/cp-field-inspect

Inspect field handles and easily edit field and element source settings

29536.8k14](/packages/mmikkel-cp-field-inspect)[yii2mod/yii2-ion-slider

Ion.RangeSlider Widget for Yii 2

21138.3k](/packages/yii2mod-yii2-ion-slider)[bayfrontmedia/php-array-helpers

Helper class to provide useful array functions.

1413.4k23](/packages/bayfrontmedia-php-array-helpers)

PHPackages © 2026

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