导入Eaxl
来源:互联网 发布:矩阵论第三版课后答案 编辑:程序博客网 时间:2024/04/28 23:17
protected void Button2_Click(object sender, EventArgs e)
{
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=FileName.xls");
// 如果设置为 GetEncoding("GB2312");导出的文件将会出现乱码!!!
Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.ASPxGrid1.RenderControl(oHtmlTextWriter);
Response.Output.Write(oStringWriter.ToString());
Response.Flush();
Response.End();
}
protected void GridView1_RowDataBound( object sender, GridViewRowEventArgs e )
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[1].Attributes.Add("style", "vnd.ms-excel.numberformat:@;");
}
}
- 导入Eaxl
- 导入
- 导入
- 导入
- 导入
- 导入
- 导入
- 导入
- 导入和静态导入
- sqlplus导入
- 导入本地
- EXCEL导入
- 导入导出
- 导入EXCEL
- 导入/导出
- oracle导入
- 导入数据库
- Excel 导入
- C#的6种常用集合类大比拼
- 深入biztalk消息以及消息订阅发布路由机制(一)-消息概述
- JAVA 继承 构造函数的执行顺序
- 持续集成实践案例解析
- ASCII表
- 导入Eaxl
- 补贴 常用的sqlserver数据填充
- ASP.NET2.0轻松搞定统计图表
- ASP.NET中使用AJAX后,Session丢失异常的自定义处理。
- asp中case的应用
- 在Delphi中使用Windows公用对话框
- NeuSoft练习5
- 几个能够有帮助的sql文 好喜欢
- Delphi 中的常用事件