Excel get last row and column for sheet, column or range

DescriptionFor those who don’t work much with Excel many times find themselves at a lost to query ranges within an Excel file to learn what the last used row/column are in a worksheet, last used row in a range which is part of a worksheet e.g. A1:B20. These samples show how to

C# (228.9 KB)
5 Star
655 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

Click an item in the panel on the left to view the contents here.