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.
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.
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).
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)
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.
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 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.
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?
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?
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.