Table Row Headers

I'm completely new to aspose.words, and am trying to get a table that may break over several pages to have header rows at the top of each page. I've read through other posts relating to builder.RowFormat.HeadingFormat = True

..can someone give me a simple example of how get this working? Something like:

Dim rowCtr As Integer = 1

builder.StartTable()

builder.InsertCell()

builder.RowFormat.HeadingFormat = True

builder.Writeln("header")

builder.EndRow()

For rowCtr = 1 To 100

builder.InsertCell()

builder.Writeln("cell " & rowCtr)

builder.EndRow()

rowCtr = rowCtr + 1

Next

builder.EndTable()

Thanks.


The code in general is correct. You only need to switch HeadingFormat off for all other rows except header:

builder.StartTable()

builder.RowFormat.HeadingFormat = True

builder.RowFormat.Borders.LineStyle = LineStyle.Single

builder.InsertCell()

builder.Write("header")

builder.EndRow()

builder.RowFormat.HeadingFormat = False ' I have inserted this line to make code working

Dim i As Integer

For i = 1 To 100

builder.InsertCell()

builder.Write("cell " & i)

builder.EndRow()

Next

builder.EndTable()

Best regards,

Thankyou very much for your prompt reply - all working happily.