How to count the row and column in a excel

Hello!

Use a Read Range to get all the information from the Excel File and then assign to a variable the count of columns and rows.

Example:

rowsCount = datatableExcel.Rows.Count
columnsCount = datatableExcel.Columns.Count

Here’s a example done: excelCounts.xaml (8.0 KB)

Hope It Helps!

Regards,

4 Likes