当前位置:编程学习 > C#/ASP.NET >>

asp.net 数据写入word表格

现在我有一个word表格,我怎么才能把数据写入这个已存在的word表格里,不需要用asp.net去制作word表格!
最好有代码,希望简洁些,各位大侠救命啊 急求!!!! --------------------编程问答-------------------- 自己定  大侠们 救命啊  --------------------编程问答-------------------- using Word = Microsoft.Office.Interop.Word;
 object routeDocument = System.Reflection.Missing.Value;
 Microsoft.Office.Interop.Word.ApplicationClass app = new Microsoft.Office.Interop.Word.ApplicationClass();

object WdLine = Word.WdUnits.wdLine;
object oEndOfDoc = "Plan";
Word.Range oRng = Doc.Bookmarks.get_Item(ref oEndOfDoc).Range;
Word.Table tb = Doc.Tables.Add(oRng, 1, 2, ref nothing, ref nothing);//添加table
tb.Rows.Alignment = Word.WdRowAlignment.wdAlignRowCenter;
tb.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle;
tb.Borders.InsideLineStyle = Word.WdLineStyle.wdLineStyleSingle;
int i = 1;
tb.Cell(1, 1).Range.Text = "年月";
tb.Cell(1, 2).Range.Text = "目标";
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,