How can I count number of rows in an Excel WITHOUT reading it

Hello!

We have a huge excel file and we need to know the number of rows it has. Because of the complexity and time the process requires to complete the operative, we are trying to not read the excel.

Can we extract this information as a “extract file info” or something like this?

PD: Read range or Excel application scope - read range is not an option.

@l.sestafes

Use below mentioned vba code to find out the number of rows in excel file if you don’t want to use Excel or Workbook activities.

Hello,

Thank you so much @lakshman. I have a question about this code tho:

Dim crb1 As Long

Range("B2").Select
Selection.End(xlDown).Select
crb1 = ActiveCell.Row

In this code I see how to count the number of rows of a certain range in a specific sheet, but how do we say which is the file? I am not very familiar with VBA…

Thank you!

1/ You could use some extension package from marketplace, e.g. GetLastRow activity from

2/ If you could modify the excel file you could use following formula to find non-empty row
=INDEX(MAX((Sheet1!$B:$B<>"")*(ROW(Sheet1!$B:$B))),0)

Cheers

Hello @l.sestafes

You can use Find First/Last row activity.

@l.sestafes

Below thread might help you.