Dim fleInfo = New System.IO.FileInfo(“文件地址”+ "扩展名")
Response.Clear()
Response.Charset = "Shift_JIS"
Response.AddHeader("Content-Disposition", "inline; filename="test.xls")
'------------------------------------------inline(在线打开),attachment(下载)
Response.AddHeader("Content-Length", fleInfo.Length.ToString())
Response.ContentType = "application/vnd.ms-excel"
Response.WriteFile(fleInfo.FullName)
Response.End
Response.Clear()
Response.Charset = "Shift_JIS"
Response.AddHeader("Content-Disposition", "inline; filename="test.xls")
'------------------------------------------inline(在线打开),attachment(下载)
Response.AddHeader("Content-Length", fleInfo.Length.ToString())
Response.ContentType = "application/vnd.ms-excel"
Response.WriteFile(fleInfo.FullName)
Response.End