I've done research on this and from that I gathered that this needs to be changed to allow it to save instead of asking where to download it to.
function send($filename) { header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=\"$filename\""); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); }
And this is what calls it: $workbook->send('HitlistSubmission_'.$subdate.'.xls'); (its not a "hitlist", its data that we have to send to iTunes to get our users promoted through iTunes). The entire code isn't relevant.
I'd like to just save the file on the server because the next step in this pain the rear is to do a script to email it to iTunes.
From what I've read, the content-disposition is supposedly doing this, but I've commented it out and it still asks where to save it.
2nd question, I have this being through a website made primarily with jquery. My function for sending the data to the page is
function export_xls() { var info = $("#paid").val(); window.open('inc/export_hitlist.php?paid='+info, 'Export'); }
Ideally, i'd like to just get a confirmation message back saying all is well, but I've tried everything that I know that would do it, all I can get it to do is return the contents of the xls file. I deleted that part of the code since i'm not using it now.
any help would greatly be appreciated!