Using Excel 2013, we had many cases where UsedRange and xlCellTypeLastCell just gave terribly wrong values.
For example, we will have a worksheet containing only 7 columns, and sometimes these two functions will tell our C # code that there are 16,000 + data columns.
The only method I found that really designed the bottom right cell containing the data was to use the hints in this sentence:
sheet.Cells.Find ()
Mike gledhill
source share