(up) ^_^ 有用过.net导出.doc的吗?
用.NET导出.doc格式的文档,如简历等!哪位有代码,给个例子!谢谢.
------解决方案--------------------导出Word:
private void Button13_Click(object sender, System.EventArgs e)
{
this.Datagrid4.Visible=true;
Response.Clear();
Response.Buffer= true;
Response.Charset= "GB2312 ";
Response.AppendHeader( "Content-Disposition ", "attachment;filename=File1.doc ");
Response.ContentEncoding=System.Text.Encoding.GetEncoding( "GB2312 ");
Response.ContentType = "application/ms-word ";
this.Datagrid4.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter (oStringWriter);
this.Datagrid4.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.End();
}