private static void AddTable(WordBuilder builder)
{
using (var table = new DataTable()) {
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Min", typeof(string));
table.Columns.Add("Avg", typeof(string));
table.Columns.Add("Max", typeof(string));
for (int i = 0; i < 10; i++) {
var r = table.NewRow();
r[0] = i.ToString(); r[1] = 10M.ToString(); r[2] = 11M.ToString(); r[3] = 12M.ToString();
table.Rows.Add(r);
}
builder.CreateTable(table, new TableStyle() {
Alignment = HorizontalAlignmentType.Center,
ShowTitle = true,
Title = "My Table"
});
}
}