<
%
Response.ContentType
=
"
application/vnd.ms-word
"
Response.AddHeader
"
Content-Disposition
"
,
"
attachment;filename=test.doc
"
Response.ContentType
=
"
application/vnd.ms-excel
"
Response.AddHeader
"
Content-Disposition
"
,
"
attachment;filename=test.xls
"
%
>
转载于:https://www.cnblogs.com/layercold/archive/2010/05/05/1727902.html