I’m building a table programmatically with
builder.StartTable()
builder.CellFormat.ClearFormatting()
builder.RowFormat.Alignment = Tables.RowAlignment.Left
builder.InsertCell()
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center
builder.CellFormat.VerticalAlignment = Tables.CellVerticalAlignment.Center
' builder.CellFormat.Orientation. = Tables.CellVerticalAlignment.Center
builder.CellFormat.Width = 257
builder.CellFormat.LeftPadding = 0
builder.CellFormat.WrapText = True
builder.CellFormat.Borders(BorderType.Right).LineWidth = 0.5
builder.CellFormat.Borders(BorderType.Right).LineStyle = LineStyle.Single
builder.CellFormat.Borders(BorderType.Top).LineStyle = LineStyle.Single
builder.CellFormat.Borders(BorderType.Bottom).LineStyle = LineStyle.Single
builder.Write("INSTITUTION AND LOCATION")
builder.InsertCell()
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center
builder.InsertHtml("DEGREE<br><i>(if <br> applicable)</i>")
builder.CellFormat.VerticalAlignment = Tables.CellVerticalAlignment.Center
builder.CellFormat.Width = 75 ' tableWidth - 11
builder.CellFormat.LeftPadding = 0
builder.CellFormat.WrapText = True
builder.InsertCell()
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center
builder.InsertHtml("Completion <br> Date<br> MM/YYYY")
builder.CellFormat.VerticalAlignment = Tables.CellVerticalAlignment.Center
builder.CellFormat.Width = 74 ' tableWidth - 11
builder.CellFormat.LeftPadding = 0
builder.CellFormat.WrapText = True
builder.InsertCell()
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center
builder.Write("FIELD OF STUDY")
builder.CellFormat.VerticalAlignment = Tables.CellVerticalAlignment.Center
builder.CellFormat.Width = 130 ' tableWidth - 11
builder.CellFormat.LeftPadding = 0
builder.CellFormat.WrapText = True
builder.CellFormat.Borders(BorderType.Right).LineStyle = LineStyle.None
builder.EndRow()
then looping a dataset to add additional rows
For Each rd As DataRowView In dtViewEducation
Add row data with formatting
builder.CellFormat.Borders(BorderType.Right).LineWidth = 0.5
builder.CellFormat.Borders(BorderType.Right).LineStyle = LineStyle.Single
builder.CellFormat.Borders(BorderType.Bottom).LineStyle = LineStyle.None
builder.CellFormat.Borders(BorderType.Top).LineStyle = LineStyle.None
Next
What I would like to do is to set the bottom border to a single line for the last row only. I found a couple of links but most go to page out of date.