Partager via


Worksheet.UsedRange Property

Definition

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

public:
 property Microsoft::Office::Interop::Excel::Range ^ UsedRange { Microsoft::Office::Interop::Excel::Range ^ get(); };
public Microsoft.Office.Interop.Excel.Range UsedRange { get; }
member this.UsedRange : Microsoft.Office.Interop.Excel.Range
Public ReadOnly Property UsedRange As Range

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.

Applies to