I am trying to download a .xls when I click a button on my website for this it is loading another page with
header("Content-type: application/vnd.ms-excel");
in the php file
I am also using certain libraries to generate the text that is to be presented in the xls file
echo "<script src = '.....'></script>"
When I remove the header part then the data is presented correctly in the browser but with the header I sometimes get the error "missing files <relative path added to my Downloads folder>", but the text is never present in the xls file which I am generating using the external javascript files
I believe when downloading they make the downloads folder the root and want all the external files to be present on my computer instead of the server
How can I work around this? Thank you