Wednesday, July 30, 2014

repeat column in table in word document using Open XML SKD

// Create Grid
TableGrid tg = t.Descendants<TableGrid>().FirstOrDefault();
                            GridColumn gc = new GridColumn() { Width = "1024" };
                            tg.AppendChild(gc);
// Get all rows and append cell to each row
                            IEnumerable<TableRow> trs = t.Descendants<TableRow>();
                            foreach (TableRow tr in trs)
                            {

                                tr.AppendChild(new TableCell(new Paragraph(new Run(new Text("")))));
                            }

No comments:

Post a Comment