I leverage Kartik's notification widgets.
I leverage Kartik's notification widgets.
To generate excel by query content, and download through any controller. You also can bind cssClass to header/odd/even rows. As for header, you even can set cssClass for each column.
$this->export2excel($excel_content,$excel_file);
in your controller.
As for complexity SQL query we have two solutions as below, I will discuss #2 in this article.
namespace app\components;
The export to excel function will affected by the final resorted columns in case you use my export grid to excel extends hzlexportgrid too, Since that export extention just depends on the grid columns configs, and that columns been customized by user themselves just now.
1. Create Extension in yii2.