yii2-excelview Excel View allows the export of data from a yii2-gridview to various formats (csv, html, xls, xlsx)

  1. Requirements
  2. Installation
  3. Usage
  4. Resources

This extension allows exporting of data from a yii2-grid This is a port to Yii2 of an extension already available for Yii1 eexcelview

Requirements

  • Tested on Yii 2.0.0
  • Requires yii2-grid and phpoffice/phpexcel

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist arturoliveira/yii2-excelview "*"

or add

"arturoliveira/yii2-excelview": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \arturoliveira\ExcelView::widget(
); ?>

To include the export buttons just add {fullexport} to your layout

All the yii2-grid options are available please refer to yii2-grid page for instructions

Since this module depends on yii2-grid don't forget to add the following to your config file

'modules' => [
    ...
    'gridview' => [
        'class' => '\kartik\grid\Module'
    ]
    ...
]

Resources

0 0
6 followers
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Developed by: Artur Oliveira
Created on: Oct 18, 2014
Last updated: 10 years ago

Related Extensions