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

Free Support Forum - aspose.com

Table Header repeated

Hi

I have a table with two rows. Each row has two cells. The last cell contains another table where I have an rdl(a tablix related). How can I access a table inside a cell. My requirement is to repeat table header that spans to multiple pages. Can you please provide me a sample code to access a table inside a cell and also how to repeat the header of inner table across multiple pages.

I tried with RowFormat.HeadingFormat = true

but of no use.

Please help me.

Hi

I tried with the following code. Still the table header is not repeated.

Aspose.Words.Tables.Table tab;

tables = mainDoc.Sections[index].Body.GetChildNodes(NodeType.Table, true);

foreach (Aspose.Words.Tables.Table t in tables)

{

//Indicates table containing rdl

if (t.Rows.Count > 3)

{

foreach (Row r in t.Rows)

{

if (r.IsFirstRow)

//setting the header row

r.RowFormat.HeadingFormat = true;

else

r.RowFormat.HeadingFormat = false;

foreach (Cell c in r.Cells)

{

c.CellFormat.FitText = true;

}

}

}

Please help me to resolve this issue.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Could you please attach your input document here for testing? I will check the problem on my side and provide you more information.

Best regards,

Hi

Thanks for your reply.

I have attached the document and also the template.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. There is no way to repeat table header on each page if the table is nested into another table. This is not restriction of Aspose.Words, but a restriction of MS Word. You can try to achieve this in MS Word and you will see that header row is not repeated in nested tables.

Best regards,