We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cells.Rows.Count of worksheet problem


worksheet.Cells.Rows.Count doesnt able to count blank rows. how can i do this?


Hi Manun,

Thanks for considering Aspose.

Well, I think you may use Cells.MaxDataRow or Cells.MaxRow properties to get the farthest row index to obtain the numbers of rows set. For example if the farthest row index is 29, it mean your data is splitted may split on 30 rows.


int mrow = cells.MaxDataRow;
int numrows = mrow+1;

Thank you.