Currently I'm working with exporting reports using Aspose Words in Java. I'm populating table with dynamic data but my main problem is when data reaches next page there is no header in exported docs. How can I get header for all pages in the exported file. Any suggestions will be appreciated.
0
votes
2 Answers
1
votes
We can solve this issue in JAVA in the following way:
1.Load the document
Document doc = new Document(getMyDir() + "Table.SimpleTable.doc");
2.Get the first table
Table table = doc.getChild(NodeType.TABLE, 0, true); //i.e. second parenthesis as index of table in doc file
3. Get the rows which is used for heading of table
Row rows = (Row) table.getRows().get(0);//we can set multiple rows as heading by passing it's index
4. set the rows as HeadingFormat = true
rows.getRowFormat().setHeadingFormat(true);