I am using ajax to call a php file passing along the data I want written to an Excel file. I do not want to save the Excel file on the server, but want to use the $objWriter->save('php://output'); (part of PHPExcel) to open it in the browser.
If I copy the ajax script call into my browser (outside my web application), the browser creates the file and the browser gives the user the option to open/save it.
But...when I run it through the ajax call in my web application, nothing shows up.
I've seen many posts where people had similar issues, but they do not really match what I am trying to do. Most seemed to actually create the file on the server and then return the file name back as the result to the ajax call and then open that file. Since I am not creating a file on the server, that won't work for me.
Is there a way to accomplish this with ajax, php, and PHPExcel? Is there a way to open the file as part of the $objWriter->save('php://output') statement?