PHPackages                             eseperio/yii2-exportable-gridview - 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. eseperio/yii2-exportable-gridview

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eseperio/yii2-exportable-gridview
=================================

Yii2 gridview with full export of data to spreadsheet.

0.1.5(5mo ago)31.5k1MITPHP

Since Feb 27Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/Eseperio/yii2-exportable-gridview)[ Packagist](https://packagist.org/packages/eseperio/yii2-exportable-gridview)[ RSS](/packages/eseperio-yii2-exportable-gridview/feed)WikiDiscussions master Synced 1mo ago

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

yii2 Exportable Gridview
========================

[](#yii2-exportable-gridview)

Gridview with **full data export**

This works as normal gridview, but adds a button to export the data loaded into it. It exports all records found on the active record query. Works with the same data as the gridview does. Uses [phpspreadsheet](https://github.com/PHPOffice/PhpSpreadsheet)to generate export file.

How does it work
----------------

[](#how-does-it-work)

Following the same behavior that pjax widget, this widget act as a normal gridview until a request is made with the url query parameters `export-grid` and `export-container`. The latter should contain the id of gridview without the hashtag. When both parameters are received, response is cleared and then spreadsheet generation begins. This allow to generate a file with absolutely all records found on the gridview.

> This project is currently under development. Any contribution is welcome.

### Installation

[](#installation)

```
composer require eseperio/yii2-exportable-gridview @dev

```

### Usage

[](#usage)

This widget extends from yii2-gridview but add functionality to export **all the rows** queried by the DataProvider.

```
use eseperio\gridview\ExportableGridview as GridView;
