word中画线和表格的问题 用asp.net(C#)在word文件里画一条线怎么画?WORD里表格只要上边和下边有边框该怎么写?请各位高手帮忙. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public void CreateWordFile() { object oMissing = System.Reflection.Missing.Value; Microsoft.Office.Interop.Word._Application oWrod = new Microsoft.Office.Interop.Word.Application(); oWrod.Visible = true; Microsoft.Office.Interop.Word._Document oDoc = oWrod.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing); //Add new table object start = 0; object end = 0; Microsoft.Office.Interop.Word.Range tableLocation = oDoc.Range(ref start, ref end); oDoc.Tables.Add(tableLocation, 3, 4, ref oMissing, ref oMissing); oDoc.Tables[1].Cell(1, 1).Range.Text = "test0"; oDoc.Tables[1].Cell(2, 2).Range.Text = "Test8989898989"; }以上,你可以参考一下, oDoc.Tables[1].Cell(1, 1).Range.Text = "test0"; oDoc.Tables[1].Cell(2, 2).Range.Text = "Test8989898989";不写的话,就是空白的表格。 1:C#在word里怎么画线2:在word里创建完表格后设置表格上边框,下连框线条 remoting 多次注册同一个信道 如何给label或button控件size属性直接赋值? 如何在同一幅图片中写不同的字? 求一用c#设计的计算器里的一个小方法 关于Resources DataGrid版面设置问题 如何在WINFORM 程序中设置IE 的相关属性 如何获取有分页的gridview里的每行的值 sql语句的问题...请教大家.......????????? C#的关于方法修饰符和类的几个问题 帮我看看这个vs装没装sp1 c#控制台 关于质数问题 附源码,帮忙改错
{
object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word._Application oWrod = new Microsoft.Office.Interop.Word.Application();
oWrod.Visible = true;
Microsoft.Office.Interop.Word._Document oDoc = oWrod.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
//Add new table
object start = 0;
object end = 0;
Microsoft.Office.Interop.Word.Range tableLocation = oDoc.Range(ref start, ref end);
oDoc.Tables.Add(tableLocation, 3, 4, ref oMissing, ref oMissing);
oDoc.Tables[1].Cell(1, 1).Range.Text = "test0";
oDoc.Tables[1].Cell(2, 2).Range.Text = "Test8989898989";
}
以上,你可以参考一下,
oDoc.Tables[1].Cell(1, 1).Range.Text = "test0";
oDoc.Tables[1].Cell(2, 2).Range.Text = "Test8989898989";
不写的话,就是空白的表格。
2:在word里创建完表格后设置表格上边框,下连框线条