Worksheet.UsedRange Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a Range object that represents all the cells that have contained a value at any time.
public Microsoft.Office.Interop.Excel.Range UsedRange { get; }
Property Value
A Range object that represents all the cells that have contained a value at any time.
Remarks
A used range includes any cell that has ever been used. For example, if cell A1 contains a value, and then you delete the value, then cell A1 is considered used. In this case, the UsedRange property will return a range that includes cell A1.