"Exporting to Excel is giving me 'Excel cannot open the file 'TourFinancial.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file. "
I have this working for several other reports, but this one. Query works well in MySQL, and I can export from there to Excel without any issue. Koolreport can present on the screen using a table, but when I am trying to export I get the error above. Note: This export has about 800 rows with about 25 columns. Is there a limit to the export function? VIEW:
<a href="/report/executeReport/Reporting:TourFinancialsExcel" class="btn btn-primary">Download Excel</a>
<?php
Table::create(array(
"dataSource" => $this->dataStore("TourFinancials"),
))
?>
Laravel Controller:
Log::info("AdminReportController:executeReport executing id=".$id);
$report = new TourFinancials;
$report->run()->exportToExcel()->toBrowser("TourFinancials.xlsx");
exit;
class TourFinancials extends KoolReport
{
use \koolreport\laravel\Friendship;
use \koolreport\amazing\Theme;
use \koolreport\inputs\Bindable;
use \koolreport\inputs\POSTBinding;
use \koolreport\excel\ExcelExportable;
function setup()
{
Log::debug("TourFinancials setup" );
$this->src('mysql')->query(QUERY ENTERED HERE ")
->pipe($this->dataStore('TourFinancials'));
thank you! Paulo