Hi,
We have created unit tests for every functionality of Aspose.Words we use in our software. That is when we came across the following difference when running the following test:
Create 4 rows with 3 columns, set for every cell the horizontal merge cell formatting to previous.
The result however was in 11.6.0 that the table would have the full width of the page, in 11.9.0 that table is only one character wide.
Code:
Dim objBuilder As New DocumentBuilder()
Dim objTable As Tables.Table = objBuilder.StartTable()
Dim intRowIndex As Integer = 0
While (intRowIndex < 4)
objBuilder.Bold = (intRowIndex = 0) ' Set the header bold
Dim intColumnIndex As Integer = 0
While (intColumnIndex < 3)
Dim objCell As Tables.Cell = objBuilder.InsertCell()
strValue = strValue.ToLower()
Select Case strOption.ToLower()
Case "horizontalmerge"
objCell.CellFormat.HorizontalMerge = Tables.CellMerge.Previous
Case Else
Throw New Exception("Option not supported")
End Select
objBuilder.Write(String.Format("option: {0}, value: {1}", strOption, strValue))
intColumnIndex += 1
End While
objBuilder.EndRow()
intRowIndex += 1
End While
objBuilder.InsertCell()
objBuilder.EndTable()
Would your please let us know if you can replicate this behaviour and if it is expected?
With kind regards,
Sjoerd van Loon
Software Engineer, Infoland BV