c# 生成word 文档。

it2026-05-26  9

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();

转载于:https://www.cnblogs.com/lfzwenzhu/archive/2011/06/09/2076544.html

相关资源:c#根据word模板生成word文档
最新回复(0)