XlsIO templatemarker pagination

We are using XlsIO templatemarkers for basic reporting but one of our reports need pagination with header and footer support. How can we implement this without manually spliting data then copying template for each page and inserting page breaks? Is there a way for this in XlsIO or some hacky way with excel


1 Reply

RS Ramya Sivakumar Syncfusion Team May 17, 2022 11:28 AM UTC

Hi Deniz,


Greetings from Syncfusion.


We don’t have support for the pagination with the header and footer while using the template marker. But after importing the data you can apply the page break and header and footer for the worksheet.


Kindly use the following code snippet to apply the pagination with the header and footer.


Code Snippet:

//Set header and Footer

worksheet.PageSetup.CenterHeader = "Header Text";

worksheet.PageSetup.CenterFooter = "Footer Text";

 

//Set Vertical Page Breaks

worksheet.HPageBreaks.Add(worksheet.Range["A7"]);


Kindly refer to the following links to know more about page breaks and header and footer.

https://help.syncfusion.com/file-formats/xlsio/working-with-excel-worksheet#page-setup-settings

https://help.syncfusion.com/file-formats/xlsio/faqs/how-to-set-or-format-a-header-footer


Regards,

Ramya.


Loader.
Up arrow icon