DataGrid 控件导出到Excel
2007-05-20 12:05
309 查看
Response.Clear();
Response.Buffer=true;
Response.ContentType="application/vnd.ms-excel";
Response.Charset="";
this.EnableViewState=false;
stringwriter sw=new stringwriter();
HtmlTextWriter htw=new HtmlTextWriter(sw);
YoueDataGrid.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
Response.Buffer=true;
Response.ContentType="application/vnd.ms-excel";
Response.Charset="";
this.EnableViewState=false;
stringwriter sw=new stringwriter();
HtmlTextWriter htw=new HtmlTextWriter(sw);
YoueDataGrid.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
相关文章推荐
- 包含CheckBox控件的DataGrid导出到EXCEL——终极方法
- asp.net 导出excel时报类型“DataGridLinkButton”的控件“dgExcel__ctl1__ctl0”必须放在具有 runat=server 的窗体标记内 解决方法
- 解决AspNet中DataGrid GridView等列表控件导出Excel长数字显示成科学计数法的问题
- 读取DataGrid或GridView等WebControls控件,导出Excel 读取Excel到dataTable中
- 将DataGrid中的数据导出为Excel的方法
- DataGrid导出成word或excel
- 扩展GridView控件(8) - 导出数据源的数据为Excel、Word或Text
- 【WPF】将DataGrid内容导出到Excel
- ASP.NET DataGrid导出Excel文件
- GridView控件编辑、更新、删除示例(更新包含有DropDownList控件使用)、导出Excel
- datagrid数据导出到excel文件给客户端下载的几种方法 (转)
- 扩展GridView控件(8) - 导出数据源的数据为Excel、Word或Text
- sl3中的DataGrid中的数据导出到Excel中 使用csv格式 解决中文是乱码的问题
- Repeater控件数据导出Excel(附演示动画)
- DataGrid导出EXCEL方法
- 数据绑定控件导出到excel
- ASP.net 把 DataGrid 数据导出到 Excel .
- easyUI datagrid数据导出为Excel
- DataGrid 导出到 Excel 的帮助类
- DataGrid导出Excel