Problem with table

Please see the example attached that I am trying create progamatically. Since I can’t use set tabs, I thought i would try using a table. I can not seem to get a line(cell) height less than about 3 lines high.

Is there a solution that would get the line height to equal a regulat height?

Maybe there is a better way to go about creating this.

In my old VB6 way of creating this was with ComponentOne AcitveX object VSView.

Any help or suggestions would be appreciated. With Visual Studio and Aspose.Word I think will be a lot easier to use if I can figure out the best way to go about it.

Here are a few things I have tried.

With builder
.Font.Bold = True
.Font.Underline = Underline.Thick
.Writeln("Item 1 (CC 01-01.00) Serial No HC-xxxx")
.Font.Bold = False
.Font.Underline = Underline.None
.Writeln(" ")
.Writeln("One (1) - Young Industries, Rotary Valve, Model ‘HC’, Class 15.")
.Writeln(" ")
.Font.Bold = True
.Writeln(" HOUSING:")
’ start table
.StartTable()
.InsertCell()
.CellFormat.Width = 250
'.RowFormat.Borders.LineStyle = LineStyle.None
'.RowFormat.Height = 5
.RowFormat.HeightRule = HeightRule.Auto
'.CellFormat.Borders.LineStyle = LineStyle.None
'.CellFormat.LeftPadding = 30
'.CellFormat.TopPadding = 1
'.CellFormat.BottomPadding = 1
'.CellFormat.Borders.LineStyle = LineStyle.None
.Font.Bold = False
.Writeln("Size: ")
.InsertCell()
.CellFormat.Width = 25
'.CellFormat.LeftPadding = 3
.Writeln(" - ")
.InsertCell()
.CellFormat.Width = 250
.Writeln("8")
.EndRow()
’ next row
.InsertCell()
.CellFormat.Width = 250
.Writeln("Inlet: ")
.InsertCell()
.CellFormat.Width = 25
.Writeln(" - ")
.InsertCell()
.CellFormat.Width = 250
.Writeln("Round")
.EndRow()
’ next row
.InsertCell()
.CellFormat.Width = 250
.Writeln("Outlet: ")
.InsertCell()
.CellFormat.Width = 25
.Writeln(" - ")
.InsertCell()
.CellFormat.Width = 250
.Writeln("Square")
.EndRow()
.EndTable()
End With

Hi,

Thank you for considering Aspose.

Yes, using a table without borders is a good workaround until tab stops have been implemented. To make cell height equal to text height, please try to insert it using DocumentBuilder.Write instead of DocumentBuilder.Writeln to avoid inserting extra paragraph breaks.

Yes, that works!

Another question.

If you define a row, with cells to a certain width, insert data, then END ROW
and then begin inserting data into the cells into the next row the cell widths and other information is NOT carried forward. Must you redefine with every insertCell all of the width etc .

We recently had a similar request from another customer. Basically, you should set cell width each time you are inserting a new cell via DocumentBuilder or simply clone a Row object if you are using nodes. Please take a look here:

https://forum.aspose.com/t/127345