We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Adding a page break in Excel

Thread ID:

Created:

Updated:

Platform:

Replies:

100134 Jul 6,2011 03:02 PM Jul 7,2011 03:11 AM ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
Guillaume Couture
Asked On July 6, 2011 03:02 PM

Hello,

I would like to add a page break in a Excel file. I need to do that dynamicaly because the line where it need to be isn't always the same.

I've tried something like :

sheet.HPageBreaks.Add(range(ligne, 1))

But it's not working.

Is adding a page break is supported in Syncfusion? If yes, how do I do it.

Thanks

Guillaume
Financial Analyst


Jawahar Jeevanandan J [Syncfusion]
Replied On July 7, 2011 03:11 AM

Hi Guillaume,

Thank you very much for using syncfusion products.

Yes, Page breaks are supported in XlsIO. The following code snippet will help you to add page breaks to the work sheet.

Code Snippet(C#):

worksheet.HPageBreaks.Add(worksheet.Range["A5"]);
worksheet.VPageBreaks.Add(worksheet.Range["B5"]);

I have also attached the sample tested at our side with this update. Please try this at your side and let us know if this helps you.

By default, page breaks are not shown in the Normal view. However, you can view them by inserting new page breaks or in page break preview. I have placed the documentation link for the same. Please go through the documentation link for further reference.

Documentation Link:
http://help.syncfusion.com/ug_92/Reporting/XlsIO/ASP.NET/default.htm?turl=Documents%2Fbreaks.htm

Please let us know if you have any clarifications.

Thanks,
Jawahar.



Sample_ab662587.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;