Hi,
Is there any maximum limit on how many CellArea I can add in AreaList of object Aspose.Cells.Validation.
When ever I export a spreadsheet It simply shows nothing , looks like kind of lock up.
and when i comment the code adding CellArea in the Validations it works fine.
Could you please Help as soon as possible.
Thanks & Rgds
Surjit S. Samra
How many CellArea do you add into AreaList of a validation? Yes, there is a limitation of 1K.
Could you please post your code here? I think you can optimize your code to create less CellArea.
Hi Laurence ,
Thanks for your reply.
here is the code and little explanation.
method IsValidForValidation() checks if I really need a validation list on a cell or not.
base.GetValidationArea() simply creates a validtion area with specified row and col.
Thanks a lot.
protected Aspose.Cells.Validation GetColumnValidation(byte l_bteColIndex,Aspose.Cells.Validation p_Val)
{
int l_intDataStart =ColumnsRow+1;
bool l_bln = false;
for(int rowID =0 ;rowID<m_dt.Rows.Count;rowID++)
{
if (p_Val.AreaList.Count == 900)
break;
if (IsValidForValidation(l_intDataStart+ rowID,l_bteColIndex))
{
p_Val.AreaList.Add(base.GetValidationArea(l_intDataStart+ rowID,l_intDataStart+rowID,l_bteColIndex,l_bteColIndex));
}
}
return p_Val;
}