Repeat table header in every page while printing until

I have one Excel template with multiple tables in one worksheet. Each table can span multiple pages when data is inserted via Aspose API and printed/saved as pdf. Is there a way to print table header for any particular table in every page if it spans more than one pages?


“Rows to repeat” of Excel in “Page Tiles” will simply repeat that row in every page which is not the desired result. Word has “Repeat header rows” under layout tab. I am looking something similar for excel.


Hi,


Well, Aspose.Cells works in the restrictions of MS Excel and follows MS Excel standards. I am not entirely sure either about your requirements. Could you create a sample file manually in MS Excel where you would specify your desired header that should be printed on the pages and it follows the way your require, save the file and post it here, we will check it on how to do this with Aspose.Cells soon.

Thank you.

I have attached a sample xlsx file with 2 tables, “Table 1” and “Table 2”. They both span multiple pages. I want headers of “Table 1” to be diplayed in page 2 too where its remaining rows are printed. Similarly, I want headers of “Table 2” to be diplayed in page 3 where remaining rows of “Table 2” will be printed. The same functionality of “Repeat header rows” in word under Layout tab.


Currently, it will print table headers of each table only once (it will not repeat in subsequent pages).

Hi,


Well, MS Excel and MS Word has different sets of features and architecture (one is spreadsheet management app and other is words processor), so a feature in MS Word might no be available in Excel and vice-versa. Well, there is one feature in MS Excel (as you mentioned) i.e…, Rows to repeat on top (in PageSetup) that you may try, but it will again repeat row 5 in all the pages of the sheet for both your Table1 and Table2.
e.g. (you may try the following line of code before rendering to PDF)
worksheet1.PageSetup.PrintTitleRows = “$5:$5”;
(See the document for your reference: http://www.aspose.com/docs/display/cellsnet/Setting+Print+Options)
I don’t think this is possible remaining in one sheet, you got to move your Table2 to other/second worksheet where you may repeat your desired rows for that sheet accordingly as well.

If you still think this is possible in MS Excel, let us know with your expected file here, we will check it soon.

Thank you.

Repeat table header in every page while printing until

Hi Sekar,


Could you elaborate your query/issue and provide more details, so we could understand you and help you accordingly. It would also be better if you could post your query/issue in a separate thread.

Thank you.

Repeat Worksheet header and Table Column header how to display every pages?
Attached the sample xlsx files.

Repeat Worksheet header and Table Column header how to display every pages?
Attached the sample xlsx files.

Hi Sekar,


Thank you for sharing the sample spreadsheet. Please note, this sample has repeating rows (1:7) specified for the Worksheet. Please check attached snapshot for your reference. You can mimic this feature using Aspose.Cells APIs by using the PageSetup.PrintTitleRows property. Please refer to the Set Print Titles in detailed article on PageSetup.

Thank you Babar Raza,

Excel Sheet Header Repeated in every pages ok and Table Columns Every Pages how to display.(worksheet HEADER and Table COLUMNS every page display) how?

Hi Sekar,


If you check the article suggested in my previous response, you will find the usage scenario PageSetup.PrintTitleColumns to repeat the specified columns on every printed page. Is this what you are referring to?