We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

The HeadingFormat propery does not work

i set HeadingFormat property of a table row to true, and in microsoft word, the chechbox of “repeat as header row…” is selected actually, but the header row did NOT dispaly in other page.

code:
var document = new Document();
var builder = new DocumentBuilder(document);
builder.StartTable();
for (var i = 0; i < 4; i++)
{
builder.InsertCell();
builder.Write(“Header” + i);
}
var row = builder.EndRow();
row.RowFormat.HeadingFormat = true;

        for (var i = 0; i < 100; i++)
        {
            for (var j = 0; j < 4; j++)
            {
                builder.InsertCell();
                builder.Write("data" + i + "," + j);
            }
            builder.EndRow();
        }

        builder.EndTable();

        document.Save("D:\\temp.docx");

@qingyuan.ni,

Thanks for your inquiry. Please use the following code example to achieve your requirement. Hope this helps you.

var document = new Document();
var builder = new DocumentBuilder(document);
builder.StartTable();
builder.RowFormat.HeadingFormat = true;
for (var i = 0; i < 4; i++)
{
    builder.InsertCell();
    builder.Write("Header" + i);
}
var row = builder.EndRow();

builder.RowFormat.HeadingFormat = false;
for (var i = 0; i < 100; i++)
{
    for (var j = 0; j < 4; j++)
    {
        builder.InsertCell();
        builder.Write("data" + i + "," + j);
    }
    builder.EndRow();
}

builder.EndTable();

document.Save(MyDir + "Out.docx");

thanks, it works!