Free Support Forum - aspose.com

Keep together range (prevent range break across pages)

Hello,

I have a range in my Aspose.Cell spreadsheet that is broken across pages (see both pages in attached screenshot)

Is there a way to prevent a range from being broken accross pages ?

Thanks for your help.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We think, you need to remove page breaks altogether to prevent your range break across the page.

Please see this article how to remove page breaks.

http://www.aspose.com/docs/display/cellsnet/Managing+Page+Breaks

Hello,

Thanks for you answer.

However removing the page breaks as you suggested didn't fix my problem, as I don't have any page breaks in my worksheet ("worksheet.Worksheet.HorizontalPageBreaks.Count" returns 0)

Is there any way to prevent cell ranges from being broken between pages ?

Hi,

Thanks for your posting and using Aspose.Cells.

We are afraid, there is no other way to prevent ranges from being broken across the pages. Adjusting page breaks is the only way we could suggest you.