int firstRow = sheet.UsedRange.Row; int lastRow = sheet.UsedRange.LastRow; int firstColumn = sheet.UsedRange.Column; int lastColumn = sheet.UsedRange.LastColumn;