Excel Rows to Repeat at Top

Stimulsoft Ultimate discussion
Post Reply
Togo
Posts: 58
Joined: Wed Jun 19, 2013 4:34 am

Excel Rows to Repeat at Top

Post by Togo »

Hi,

In Excel, we can set certain rows to repeat as page header by clicking this --> Click the [Page Layout] tab > In the "Page Setup" group, click [Print Titles]. Under the [Sheet] tab, in the "Rows to repeat at top" field, click the spreadsheet icon to select cells to repeat.

May I know can we set this in the report? So that when we export this report as Excel, it can default the "Rows to repeat at top"?

Thank you very much
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Excel Rows to Repeat at Top

Post by Edward »

Hi Togo,

Please uncheck 'Use One Page Header and Footer' checkbox in the Excel Export dialogue form in the report viewer, as suggested in the following topic:
https://www.stimulsoft.com/en/documenta ... footer.htm

Also, it could be done from code:
viewtopic.php?f=8&t=48551

https://www.stimulsoft.com/en/blog/arti ... -converter

Thank you,
Edward
Togo
Posts: 58
Joined: Wed Jun 19, 2013 4:34 am

Re: Excel Rows to Repeat at Top

Post by Togo »

Hi,

Further question on the above. Would that be possible to set the cell range in "Rows to repeat at top" just like the below screen capture? Thanks so much!
7139c196-e686-4dec-88ca-fbdc5b547424.jpg
7139c196-e686-4dec-88ca-fbdc5b547424.jpg (20.66 KiB) Viewed 1852 times
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Excel Rows to Repeat at Top

Post by Edward »

Hi Togo,

That is definitely possible. If you would like to imagine the report layout as one big spreadsheet of cells, then you need to follow the general advice on building such a layout as per the following guide:
https://www.stimulsoft.com/en/documenta ... sheets.htm

After that, you need to place the rows that you decided to use as the header rows on every 'imaginary Excel page for printing purposes' from the top range of your report template, let's say as follows:
$1:$1 - if it is one row for header cells or
$1:$2 - if you need to display 2 rows as a header for every page in the report
to the Header Band

Then as I mentioned above, do not forget to tick the following option for the Excel Export dialogue box:
'Use One Page Header and Footer' checkbox
That option will repeat the Header cells from the Header Band on every page of the exported report in Excel.
If you are still in doubt, please feel free to add any additional screenshots or a mrt file of your report to this topic and we will try to help you out with your task.

Thank you,
Edward
Post Reply