//导出到Excel文件 protected void btnToExcel_Click(object sender, EventArgs e) { Response.Clear(); //讲一个Http标头添加到输出流 Response.AddHeader("content-disposition","attachment;filename=FileName.xls"); //设置输出流的字符集 Response.Charset = "utf-8"; //设置Http MIME 类型 Response.ContentType = & Read More