koolreport icon indicating copy to clipboard operation
koolreport copied to clipboard

Excel Export

Open georgegijo opened this issue 6 years ago • 5 comments

Downloaded the excel package and put it to the Packages folder. But an error is generated Call to undefined method SponsorReportData::exportToExcel(). Can you please let me know what could be the problem? Thanks.

georgegijo avatar Jun 21 '18 03:06 georgegijo

Hi George,

To use the function exportToExcel, please use the ExcelExportable trait like this:

`class MyReport extends koolreport\KoolReport {

use \koolreport\excel\ExcelExportable;

...`

koolphp avatar Jun 21 '18 04:06 koolphp

Thanks for the help. That resolved the issue. Can you please tell me how can I download the excel file. when I use $report->run()->exportToExcel()->toBrowser("myreport.xlsx"); it is downloading not the excel file but the same html page I am in.

georgegijo avatar Jun 21 '18 04:06 georgegijo

Hi George,

Did your browser auto save any file?

dongnl avatar Jun 21 '18 04:06 dongnl

nothing is autosaved.

georgegijo avatar Jun 21 '18 04:06 georgegijo

Hi George,

It seems there's problem with exporting your data. I suggest you going to koolreport website, client section to open a ticket and send us your php code as well as sample data for our support team to check on it.

dongnl avatar Jun 21 '18 04:06 dongnl