Regarding excel automation of row count

How to find the row count of a excel sheet which has columns that have different number of rows dynamically,(if not dynamically also, please give the answer).
Eg:col 1 have 5 rows,col2 have 9 rows and so on up to …col10,say.

Thanks in advance .

@Kiran_Kumar You could read the Excel Sheet using Read Range Activity Either Excel or WorkBook and get the result in a Datatable variable say DT.

Then DT.Rows.Count Should give you the Total Row Count present in the Excel.

In your Example case, The Row counts are different for each of the Column, then the DT.Rows.Count value would be the Highest Row Count out of the Columns Present.

Let us know if this did not give you the expected solution

Hi @supermanPunch

Thanks for the reply.

The question is how to know the row count of columns which has different rows,not the Highest row count.the bot has to print ,say in message box, each row count of a column one by one.