Download an Excel file

后端 未结 3 1298
猫巷女王i
猫巷女王i 2021-01-29 01:30

I have read some past posts here on how to download a Excel file from a website. So, I have setup the below code:

string path = MapPath(fname);
string name = Pa         


        
3条回答
  •  醉话见心
    2021-01-29 01:48

    You need to send this before the file attachment header:

    Response.ContentType = "application/vnd.ms-excel"
    

    See: Export data to excel file from Classic ASP failing

提交回复
热议问题