文章出處

 Response.ContentType = "application/vnd.ms-excel";
            Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", HttpUtility.UrlEncode(execlName)  + DateTime.Now.ToString("yyyy-MM-dd").Trim() + ".xls"));
            Response.Clear();
            excel.WriteTo(Response.OutputStream);
            Response.End();
HttpUtility.UrlEncode(execlName) //防文件名亂碼

文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜

    大師兄 發表在 痞客邦 留言(0) 人氣()