Response.ContentType = “application/vnd.ms-excel”

2019-06-02 22:36发布

I have got an asp file with the following header Response.ContentType = "application/vnd.ms-excel" ,it displays the file in an excel format.This works in IE and firefox but not in safari. Any ideas why?

1条回答
Fickle 薄情
2楼-- · 2019-06-02 22:57

Well, you can try forcing it like so:

Content-type: application/force-download

Content-disposition: attachment; filename="somefile.txt"

Please say if it works for you. Hope it helps.

查看更多
登录 后发表回答