You can work with the rows and columns of the sheet and distinguish which ones have data by using various members of the SheetView class. You can use the following methods available on the sheet:
You can return the number of rows and columns that have data using these properties: