Hi,
In the middle of my report.view
file after some processes, I have a variable $tmp_datastore with a datastore.
How is better to export it to excel?
I tried to use the Excel Table widget
and do like this
\koolreport\excel\Table::create(array(
"dataSource" => $tmp_datastore
,
));
But it looks like I need some parameters or something like that because I get the error
PHP Notice: Undefined property: stock_v4::$excelExportHandler in .../koolreport/excel/Widget.php on line 16,
PHP Fatal error: Uncaught Error: Call to a member function setWidgetParams() on null in .../koolreport/excel/Widget.php:16,
I need only to save the datastore as excel - the format, etc is not important. How to do it with minimum code in a view file - it is a bit complicated to wrap my report to something else or create some special excel report files - I thought the widget is exactly for this purpose.