Dear KoolReport team,
I am working on Excel Export feature. I got the Table data. My Excel file is also downloaded. But the data in the Excel file is corrupted. Why it happens, I can't understand. Please help me. I am working with Codeigniter3 and SqlServer
Here is my code.
Controller
class Enquiry extends CI_Controller
{
public function export()
{
include APPPATH."reports\EnquiryReport.php";
$report = new EnquiryReport;
$report->run();
$report->exportToExcel('EnquiryExcel')->toBrowser("EnquiryReport.xls");
}
}
If I given extension as "xls", then the corrupted data is displaying in Excel. else for the extension "xlsx", it opens the empty file.