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

Free Support Forum - aspose.com

Repeat table headers when report runs multiple pages


In my application I export grid into excel sheet. the table has too many row. printing the excel requires more then one page.

my question:

Is it possible repeat the table headers? So if the report runs to multiple pages, lines 1-3 repeat.
(line 1-3 contains main page header and table headers)




Well, sure you may do what you want to achieve. Please see the document for your reference:

I think you may use PrintTitleRows attribute of PageSetup object for the worksheet.

Sample code:

//Obtaining the reference of the PageSetup of the worksheet
Aspose.Cells.PageSetup pageSetup = workbook.Worksheets[0].PageSetup;

//Defining row numbers 1, 2 & 3 as title rows
pageSetup.PrintTitleRows = “$1:$3”;