html - Click on CSV file link within an iframe opens in Browser (IE6) instead of MS Excel -
I hope someone can help me
I have an iframe that has a report , Which allows a user to click on a link to open the report within MS Excel.
My problem is here that when the user clicks on the link to export and open within MS Excel it actually opens inside the brusher window - instead of MS Excel, MS IE 6, which I do not want.
How do any ideas come about this?
Thanks Tony
Are you sending the correct header to the customer?
For Excel, these headers may look like this:
header ('content type: application / vnd.ms-excel; charset = yourcharset'); Header ('Content-Disposal: Attachment; Filename = yourfilename.xls');
And if you open your Excel sheet correctly but are still in the browser window, then you can do two things. 1) Change that setting on your local machine or 2) Use application / octet-stream as content type. Then the browser will not try to open the file.
Comments
Post a Comment