Worksheet.UsedRange Property

 

Gets a Microsoft.Office.Interop.Excel.Range object that represents all the cells that have contained a value at any time.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Range UsedRange { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Range

A Microsoft.Office.Interop.Excel.Range object that represents all the cells that have contained a value at any time.

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.

Return to top
Show: