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. Image for the cookie policy date

Set print page width using page break

I'm trying to set page breaks using XlsIO so all my columns are included when printing the page.

I am trying the following, as I have seen in previous posts, but it has no effect.

ws.HPageBreaks.Add(ws.Range["A51"]);
ws.VPageBreaks.Add(ws.Range["G51"]);

The vertical page break is ignored and set after the column 'D'.
Am I missing something?


1 Reply

JB John Bowlin Bosco K Syncfusion Team June 8, 2011 07:40 AM UTC

Hi Marcus,

Thank you very much for your interest in Syncfusion Products.

We were unable to reproduce the issue from our end. We have created a sample and tested with dlls of version 9.2.0.18 in 3.5 framework. Setting horizontal page break using ws.HPageBreaks.Add(ws.Range["A51"]); will insert the page break at row 50 and setting vertical page break using ws.HPageBreaks.Add(ws.Range["A51"]); will insert the page break at column F. For your reference, we have attached the sample below. Could you please find the sample and let us know if this helps you?

Sample Link:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=SettingPageBreakSample1645289335.zip

If you still encounter any issue, it would be great if you could revert back with a simplified issue reproducing sample or the input template, which will help us to investigate further.

Please let us know if you need any further assistance.

Regards,
Pauline Bosco


Loader.
Live Chat Icon For mobile
Up arrow icon