You can use
HtmlTextWriter on webpage for create Word/Excel document and post edit...
For example: export Grid on webpage to Word
public static void ExportToWord(System.Web.UI.Page p, DataGrid grdGridView, string fileName)
{
p.Response.Clear();
p.Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.doc", fileName));
p.Response.Charset = "";
p.Response.ContentType = "application/vnd.doc";
StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
myGridView.RenderControl(htmlWrite);
p.Response.Write(stringWrite.ToString());
p.Response.End();
}