我的 Word 文档中有一个现有表格,其中仅包含标题。我想以编程方式在该表上添加数据。我想在其中添加行,但找不到参考如何:
我尝试了以下方法:
Table myTable = document.Tables[0];
Row myRow = new Row();
myTable.Rows.Add(myRow);
myTable.Rows[0].Cells[0].Paragraphs.First().Append("Sample Data");
myTable.Rows[0].Cells[1].Paragraphs.First().Append("Sample Data");
这在构建后返回错误:The type 'Novacode.Row' has no constructors defined