badegg
    Response.Clear()
    Response.buffer = true   
    Response.ContentType = "application/vnd.ms-excel; utf-8"
    Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8")
    \'Response.Charset = "utf-8"
    If Instr(1, Request.ServerVariables("HTTP_USER_AGENT"), "MSIE 4.01") > 0 Then   
        Response.AddHeader("Content-Disposition","inline;filename="+ny+"水电.xls")  
    Else   
        Response.AddHeader("Content-Disposition","attachment;filename="+ny+"水电.xls")   
    End If

分类:

技术点:

相关文章: