private TableRow[] GetData() { List<TableRow> rows = new List<TableRow>(); TableRow tmpRow; foreach (DataRow row in data.Rows) { tmpRow = new TableRow(GetCells(row)); rows.Add(tmpRow); } return rows.ToArray(); }
private static OpenXmlElement GetFormattedTableRow(TableRow row) { Word.TableRow formattedRow = new Word.TableRow(); foreach (var cell in row.SubElements) { if (cell == null) { formattedRow.Append(null); continue; } if (cell.GetElementType() == ElementType.TableCell) formattedRow.Append(GetFormattedCell((TableCell)cell)); else throw new InvalidSubFeatureException(row.GetElementType().ToString(), cell.GetElementType().ToString()); } return formattedRow; }
public void AddRow(TableRow row) { data.Rows.Add( (TableCell[]) row.SubElements); }