public override void Build(XlsArea area, XlsFormColumnAdjuster adjuster) { var maxRow = Cells.Max(c => c.Row); var maxCol = Cells.Max(c => c.Col); for (var r = 0; r <= maxRow; r++) { var row = area.AddRow(); var info = adjuster.Find(this, -1); if (LeftMargin > 0) { var marginCell = row.AddEmptyCell(info != null ? info.ColSpan : 0); marginCell.Style.Borders = TableCellBorder.None; } for (var c = 0; c <= maxCol; c++) { info = adjuster.Find(this, c); var cell = Cells.FirstOrDefault(i => i.Row == r && i.Col == c); if (cell != null) { var xlsCell = row.AddText(cell.Text, info != null ? info.ColSpan : 1); xlsCell.Style = ContentStyle.MergeStyles(Style, cell.Style); } else { var xlsCell = row.AddText("", info != null ? info.ColSpan : 1); xlsCell.Style = Style; } } } }
public override void Build(XlsArea area, XlsFormColumnAdjuster adjuster) { var row = area.AddRow(); var info = adjuster.Find(this, -1); if (LeftMargin > 0) { row.AddEmptyCell(info != null ? info.ColSpan : 0); } info = adjuster.Find(this, 0); var cell = row.AddText(Text, info != null ? info.ColSpan : 1); cell.Style = Style; }
public virtual void Build(XlsArea area, XlsFormColumnAdjuster adjuster) { }