-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
using (var doc = DocX.Create(@"z:\blah\blah\blah\doc.docx", DocumentType.Document))
{
var table = doc.AddTable(5);
for (int k = 0; k < 10; k++)
{
for (int i = 0; i < 5; i++)
{
var row = table.AddRow();
row.SetBorders(Units.HalfPt, BorderValue.Single);
for (int j = 0; j < 5; j++)
{
row.Cells[j].Paragraphs[0].Append($"Cell {(j + 1)}");
}
}
var rows = table.Rows.ToList();
var c = k * 5;
var firstRow = rows[c];
firstRow.Cells[0].MergeRight = 3;
firstRow.Cells[1].AddParagraph().Append("Should not display.");
var secondRow = rows[c + 1];
secondRow.Cells[1].MergeDown = 3;
var thirdRow = rows[c + 2];
thirdRow.Cells[1].AddParagraph().Append("Should not display.");
}
doc.Save();
doc.Close();
}
Metadata
Metadata
Assignees
Labels
No labels