c# 利用word 软件生成word里面的table
2021-01-20 16:12
标签:text cells gray bsp doc paste title string ble c# 利用word 软件生成word里面的table 标签:text cells gray bsp doc paste title string ble 原文地址:https://www.cnblogs.com/gisbeginner/p/12123941.html public static void GenerateWordTable(string title)
{
Range rng=CaCheContext.doc.Range();
Table table= CaCheContext.doc.Tables.Add(rng, 3, 3,true,true);
table.Rows[1].Cells[1].Range.Text = "图表1:" + title;
table.Rows[1].Cells[2].Range.Text =string.Empty;
table.Rows[1].Cells[3].Range.Text = "图表2:" + title;
table.Rows[2].Cells[1].Range.Paste();
table.Rows[2].Cells[2].Range.Text = string.Empty;
table.Rows[2].Cells[3].Range.Paste();
table.Rows[3].Cells[1].Range.Text = "来源:";
table.Rows[3].Cells[2].Range.Text = string.Empty;
table.Rows[3].Cells[3].Range.Text = "来源:";
//table.set_Style();
table.Rows[3].Cells[1].Range.Font.Color = WdColor.wdColorGray80;
table.Rows[3].Cells[1].Range.Font.Size = 8;
table.Rows[3].Cells[3].Range.Font.Color = WdColor.wdColorGray80;
table.Rows[3].Cells[3].Range.Font.Size = 8;
//table.Rows[3].Cells[3].Range.set_Style("引用");
}
文章标题:c# 利用word 软件生成word里面的table
文章链接:http://soscw.com/index.php/essay/44608.html