PHP xlsx header
问题 so this works: myphpfile.php: <?php header('Content-disposition: attachment; filename=myfile.pdf'); header('Content-type: application/pdf'); readfile('myfile.pdf'); ?> that php file is called here and the PDF download works fine: <a class = "oglasavanje" href = "../../cjenik/myphpfile.php">download</a><br/> but this doesn't work: <?php header('Content-disposition: attachment; filename=myfile.xlsx'); header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');