java.lang.IllegalArgumentException: Too many CellAreas for validation, maximum count of CellArea for this Validation is 1021
at com.aspose.cells.Validations.a(Unknown Source)
at com.aspose.cells.L.q(Unknown Source)
at com.aspose.cells.L.a(Unknown Source)
at com.aspose.cells.dL.x(Unknown Source)
at com.aspose.cells.dL.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
Is it possible to ask the Aspose Cells Api about the limits before getting a runtime exception? Are the limits constant? If not, maybe you could provide methods that calculate the limits?
Well, actually it is not a fixed value/number for it. It is, in fact a value that is calculated by the Saving process when saving the workbook. One validation’s record cannot exceed its maximum length, this record contains the settings of validation, such as, the condition, the error messages, and so on, etc. So, if there are many settings implemented for the validation, such as, the length of error message i.e., the longer it is, the lesser would be the count of the areas (contained), because more space in this record will be needed by the error message. It is the limit put forth by Excel 2003 actually.
Can you please create a specific exception for this, like TooManyCellAreasException instead of throwing an IllegalArgumentException? That way we can catch it and take appropriate action.
For this exception, how about replacing it by a CellsException with code “INTERNAL_CHECK_ERROR”? If it can fit your requirement, we will provide a fix soon.