Exportable Widget for Yii2
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:
- json: Custom Spout writer by 2amigos
- csv: By Spout library
- xlsx: By Spout library
- html: Custom Spout writer by 2amigos
- txt: Custom Spout writer by 2amigos
- xml: Custom Spout writer by 2amigos
- ods: By Spout library
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.
php composer.phar require "2amigos/yii2-exportable-widget" "*"
"2amigos/yii2-exportable-widget" : "^2.0"
to the require section of your application's
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)
This button is responsible of rendering the dropdown button that will display the exporting options.
For your very own custom exportation.
© 2amigos 2013-2017