Exportable Widget for Yii2

Latest Stable Version Software License Total Downloads Build Status Quality Score

Exportable Widget

More than a simple widget, is a library. With this library you would be able to provide exporting capabilities to your Yii2 application whether you use our GridView Library (which is highly recommended) or your own.

If you are using our GridView Library, you will take the advantage of a predefined set of exporting formats that, in conjunction with the ToolbarBehavior, you could export with a mere couple of configuration settings on your grid. The predefined exporting formats are:

We have chosen the amazing Spout library for the great API it has and the ease of use. This library is not only amazingly fast but also provided a mechanism that was really easy for us to create custom writers.

Do not be scared by the amount of classes than this library contains, you will have to focus only on a few of them.


The preferred way to install this extension is through composer.

Either run

php composer.phar require "2amigos/yii2-exportable-widget" "*"

or add

"2amigos/yii2-exportable-widget" : "^2.0"

to the require section of your application's composer.json file.

Note The reason why it starts at version 2.0 is that previously, this library was a jquery plugin with exportation capabilities on the client side. The limitations of that library were obvious on our work, as most of our customers required the full download of all data from master reports. We have not encountered yet a customer that only wishes to download the visible page. Do not use any version prior 2.0 at least you want the jquery plugin instead (not recommended)

Library Components

ExportableButton Widget

This button is responsible of rendering the dropdown button that will display the exporting options.

ExportableAction Component

For your very own custom exportation.


Helpful Guides


© 2amigos 2013-2017