I am trying to create and download an excel file in php using the PHPExcel library. The part of creating the file goes well, but when it comes back to download in Linux it does not work for me in Windows works perfectly.
// We'll be outputting an excel file
header('Content-type: application/vnd.ms-excel');
// It will be called file.xls
header('Content-Disposition: attachment; filename="file.xls"');
$objWriter = \PHPExcel_IOFactory::createWriter( $objPHPExcel, "Excel2007" );'introducir el código aquí'
// Write file to the browser
$objWriter->save('php://output');