PHPackages                             gri3li/yii2-grid-file - 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. gri3li/yii2-grid-file

ActiveYii2-extension[PDF &amp; Document Generation](/categories/documents)

gri3li/yii2-grid-file
=====================

This Yii2 extension provides ability to export data form data provider to format supported by PhpSpreadsheet

v1.3(2y ago)29131BSD-3-ClausePHP

Since Oct 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gri3li/yii2-grid-file)[ Packagist](https://packagist.org/packages/gri3li/yii2-grid-file)[ RSS](/packages/gri3li-yii2-grid-file/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Data Export extension for Yii2
==============================

[](#data-export-extension-for-yii2)

This Yii2 extension provides ability to export data form instances of `yii\data\DataProviderInterface` to format supported by PhpSpreadsheet

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

[](#installation)

Install the package via Composer:

```
composer require gri3li/yii2-grid-file
```

Usage
-----

[](#usage)

```
$export = new \gri3li\yii2gridfile\GridFile([
   'dataProvider' => new \yii\data\ArrayDataProvider([
       'allModels' => [
           [
               'name' => 'some name',
               'date' => 1538571363,
           ],
           [
               'name' => 'name 2',
               'date' => 1538571363,
           ],
       ],
   ]),
   'columns' => [
       'name',
       'date:datetime',
   ],
   'headerCellStyle' => [
       'font' => ['bold' => true],
       'fill' => [
           'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
           'startColor' => ['rgb' => 'CCCCCC'],
       ],
   ],
]);
$export->saveAs(\PhpOffice\PhpSpreadsheet\Writer\Xls::class, '/path/to/file.xls');

// $export->saveAs(\PhpOffice\PhpSpreadsheet\Writer\Xlsx::class, '/path/to/file.xlsx');
// $export->saveAs(\PhpOffice\PhpSpreadsheet\Writer\Ods::class, '/path/to/file.ods');
// $export->saveAs(\PhpOffice\PhpSpreadsheet\Writer\Html::class, '/path/to/file.html');
// $export->saveAs(\PhpOffice\PhpSpreadsheet\Writer\Csv::class, '/path/to/file.csv');
```

More info about phpspreadsheet style

Use case

For run use case:

```
cd vendor/gri3li/yii2-grid-file/example/
php -S 127.0.0.1:8877

```

open

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~670 days

Total

4

Last Release

816d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1644876?v=4)[Mikhail Gerasimov](/maintainers/gri3li)[@gri3li](https://github.com/gri3li)

---

Top Contributors

[![gri3li](https://avatars.githubusercontent.com/u/1644876?v=4)](https://github.com/gri3li "gri3li (10 commits)")[![microinginer](https://avatars.githubusercontent.com/u/1836062?v=4)](https://github.com/microinginer "microinginer (1 commits)")

---

Tags

yii2-extensionexportxlsxlsxcsvodsgridyii2

### Embed Badge

![Health badge](/badges/gri3li-yii2-grid-file/health.svg)

```
[![Health](https://phpackages.com/badges/gri3li-yii2-grid-file/health.svg)](https://phpackages.com/packages/gri3li-yii2-grid-file)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[kartik-v/yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)

1613.2M36](/packages/kartik-v-yii2-export)[sonata-project/exporter

Lightweight Exporter library

44121.3M38](/packages/sonata-project-exporter)[jgrygierek/batch-entity-import-bundle

Importing entities with preview and edit features for Symfony.

101.1M1](/packages/jgrygierek-batch-entity-import-bundle)[phpnt/yii2-export

Yii2 It saves data in xls, csv, word, html, pdf files.

158.9k](/packages/phpnt-yii2-export)[nilgems/laravel-textract

A Laravel package to extract text from files like DOC, XL, Image, Pdf and more. I've developed this package by inspiring "npm textract".

195.7k](/packages/nilgems-laravel-textract)

PHPackages © 2026

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