Hi George,
I think it's because you submit the export button to the same report page so it will output the same report header and html first. Later the report could not send an exported excel file to your browser because it already sent header with html data.
Please try to export in the following way, create a php file called myReportExcelExport.php with your export code:
$report = new SponsorReportData(); $report->run()->exportToExcel()->toBrowser("myreport.xlsx");
Then in your report page, use the following export button:
<button type="submit" class="btn btn-primary exportBtn" formaction="myReportExcelExport.php">Export to Excel</button>
Please try this and let us know if there's any problem. Thanks!