A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
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.