c# 生成word 文档。
时间:2011-06-09 来源:空紫竹
string ss = o.ToString();
Response.Expires = 0;
Response.Buffer = true;
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("Content-disposition", "attachment; filename=1.doc");
Response.ContentType = "application/vnd.ms-word";
Response.Write("<html><head>");
Response.Write("<title></title></head><body>");
Response.Write(ss);
Response.Write("</body></html>");
Response.Flush();
Response.End();
Response.Expires = 0;
Response.Buffer = true;
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.AddHeader("Content-disposition", "attachment; filename=1.doc");
Response.ContentType = "application/vnd.ms-word";
Response.Write("<html><head>");
Response.Write("<title></title></head><body>");
Response.Write(ss);
Response.Write("</body></html>");
Response.Flush();
Response.End();
相关阅读 更多 +