I added eexcelview and phpmyexcel to my app.ext. Then i created additional action in my controller:
public function actionEksport()
{
// Load data
$model = Obs::model()->findAll();
// Export it
$this->toExcel($model,
array(
'col1',
'col2',
),
'Eksport',
array(
'creator' => 'admin',
),
'Excel2007' // This is the default value, so you can omit it. You can export to CSV, PDF or HTML too
);
}
Everythings works fine, data are exported when i click button in my view, which called action controller/eksport. But i want to export data, which are only displayed on screen (for example, search result from "advanced search" etc…)
, and when i try to execute my export action, url look like: http://example.com/obs/eksport - and it export data without parameters - simply, actionEksport don’t know criteria…