承接 custom-it/yii2-excel-report 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

custom-it/yii2-excel-report

最新稳定版本:1.0.1

Composer 安装命令:

composer require custom-it/yii2-excel-report

包简介

An extension for generate excel file from GridView content

README 文档

README

- !!! Library is deprecated !!!

Yii2 ExcelReport Extension


An extension for generate excel file from GridView content. When used with a GridView, extention saves the results of filtering and sorting in a file. Everything you see in the GridView will be imported into a file. All tasks are run in the background, the user can check the progress with the progressbar. It is not necessary to remain on the current page during the execution. You can continue working with the application. When the file is created, the download link will remain on the page with the widget until it is used, the user can use it at any time. When the file is downloaded, you can start generating a new report.

To run tasks in the background, the extension uses a queues.

Use the extension only makes sense to generate large files (> 50,000 lines).

Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

php composer require --prefer-dist custom-it/yii2-excel-report

or add

"custom-it/yii2-excel-report": "*"

to the require section of your composer.json file.

Configuration

Before using the module, configure the queues

Add progress behavior to Queue configuration:

'queue' => [
    // ... you Queue configuration ...
    'as progress' => \customit\excelreport\ProgressBehavior::class,
],

Usage

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

$gridColumns = [
    ['class' => 'yii\grid\SerialColumn'],
    'id',
    'name',
    'date',
    'post',
    ['class' => 'yii\grid\ActionColumn'],
];

// Render widget
echo \customit\excelreport\ExcelReport::widget([
    'columns' => $gridColumns,
    'dataProvider' => $dataProvider,
]);

// Can be used with or without a GridView
echo GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'columns' => $gridColumns
]);

统计信息

  • 总下载量: 1.85k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 38
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 38
  • Watchers: 9
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-07-25