Setting the page break dynamically(increasing or decreasing)

Hi,

I want to set my page break dynamically depends on the text coming, for example -

if we could know that page break is coming on row no 6 , so we can increase or decrease it .


Thanks,

Mukund

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

Well, you may try Worksheet.HPageBreaks and Worksheet.VPageBreaks collection to get / set the page breaks. Please see the following documentation link for further detail.

http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/managing-page-breaks.html

Thank You & Best Regards,

Hi aslam,

When excel is generated , Is their any way in aspose to know on which row no. page break will appear .

Thanks,

Mukund

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

If you want to get the custom page breaks, you may check the link provided in my previous post. If you want to get the automatic excel generated page breaks, we will look into this feature and get back to you. Your issue has been registered in our internal issue tracking system with issue id: CELLSNET-16284.

Thank You & Best Regards,

Hi,

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

Please try the attached latest fix. We have added a new method Worksheet.GetPrintingPageBreaks.<?xml:namespace prefix = u1 />

Please see the following sample code in this regard.

ImageOrPrintOptions options = new ImageOrPrintOptions();

//Each cell area repensts a pinting page

CellArea[] cas = workbook.Worksheets[0].GetPrintingPageBreaks(options);

Thank You & Best Regards,