We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Setting PageBreaks in a excel worksheet

I am using Aspose Cells version - I am trying to set the Page Breaks.

I have few questions.

I am using the following code

Worksheet workSheet = null;
workSheet = m_workBook.getWorksheets().getSheet(“Test”);
// Horizontal PageBreak
int iHorizontalPageBreak = 30;
// Vertical PageBreak
int iVerticalPageBreak = 10;


When I use the above code, I am not seeing the Pagebreaks at the specified location 30 and 10.
I am seeing multiple Page breaks. Please find the attached snapshot, where I see 4 pages.

1. Please help me to resolve the issue.

2. When do I need to use the following code, which is related HPageBreaks and VPageBreaks

HPageBreaks objHPageBreaks = m_workSheet.getHPageBreaks();


VPageBreaks objVPageBreaks = m_workSheet.getVPageBreaks();


Your help is appreciated.


Praveen S D

Hi Praveen,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We have found your mentioned issue regarding setting page break after an initial test. We will look into it and get back to you soon. Your issue has been registered in our internal issue tracking system with issue id: CELLSJAVA-14590.

Thank You & Best Regards,


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please try the attached latest version of Aspose.Cells. If you still face any problem, please share your template file with sample code to reproduce the issue. We will check it soon.

Thank You & Best Regards,