MS Excel limitation - The count of HPageBreaks cannot be larger than 1024

I am trying to use Aspose.cells merge functionality using 70 MB file. Getting the following error:

The count of HPageBreaks cannot be larger than 1024.


Appreciate help.

Hi Srinivasa,


The exception message that you are experiencing is actually the limitation imposed by MS Excel application, that is; a spreadsheet cannot have more that 1024 page breaks. Please provide more details of your scenario so we could suggest you a workaround for the situation.

Hi Babar Raza:


Thanks for the clarification and reply.

From your information, I understand that it is limitation in Excel it self.

So couple of clarifications:

1. Is it for XLS and XLSX - both types?
2. Is there workaround to programmatically override it using Aspose?
3. Is there a way we can generate a file of any size say up to 100 MB with a predefined page breaks through SAP BO?
4. Any other Aspose work around options - :slight_smile:

Thanks again and appreciate your input.



Hi Srinivasa,


Let me correct my previous statement first, MS Excel imposes the restriction that XLSX file format could have 1026 manual page breaks whereas XLS format could have 1000 manual page breaks. Aspose.Cells seems to restrict the limit at 1024, that is not aligned with MS Excel specifications. We have logged a ticket in our bug tracking system to look further into this matter.

Regarding your questions, please find below the answers,
  1. Limits are as follow,
  • XLS: 1000
  • XLSX: 1026
  • As Aspose.Cells APIs follow MS Excel’s guidelines and recommendations therefore you may not exceed the specified limitation while using Aspose.Cells APIs.
  • We are not sure how to generate spreadsheets using SAP BO because that is not our area of expertise. However, you may generated any file size using Aspose.Cells APIs while following the MS Excel guidelines.
  • We would like to know more details of your scenario, and possibly review your samples to propose a workaround for the situation.

  • As it seems you are merging spreadsheets and hitting the exception as stated in title of this thread, we need to review your source code as well as a few samples to replicate the said exception on our end. As soon as we have isolated the cause of exception, we will be in a better position to suggest a workaround for the situation.

    Thank you for your understanding & cooperation.