我正在寫一個ASP.NET應用程序在C#中,我試圖寫一個表格到一個Word文檔。ASP.NET:寫一個表格(和複選框)到Word文檔
我目前使用下面的代碼寫入到一個Word文檔:
string strContent = "This content goes to the word document";
string attach = "attachment; filename=wordtest.doc";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/msword";
HttpContext.Current.Response.AddHeader("content-disposition", attach);
HttpContext.Current.Response.Write(strContent);
HttpContext.Current.Response.End();
HttpContext.Current.Response.Flush();
現在,我的問題是,如果有人知道我怎麼能寫一個表到Word文檔?
而第二個問題是,如果有人知道如何寫複選框到Word文檔(如您從網站複製並粘貼到字)
提前感謝!
Killerwes
看我的帖子 – AEMLoviji 2011-03-19 09:08:39