How to calculate Number of rows in Excel ?
Anu,
The function you are using is only suited for textfiles. If you want
the number of rows in an excel sheet, use
Sheet1.UsedRange.Rows.Count() but remember that for excel every cell
with something in it or with (conditional) formatting is considered
used, so you might be counting some 'empty' rows.
DQ
|