[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IRange.GetUsedRange

GetUsedRange Method

GetUsedRange(UsedRangeType)

Gets an IRange representing the used range in the current range.

Declaration
IRange GetUsedRange(UsedRangeType type = UsedRangeType.All)
Function GetUsedRange(Optional type As UsedRangeType = UsedRangeType.All) As IRange
Parameters
Type Name Description
UsedRangeType type

The feature type.

Returns
Type Description
IRange

The used range for the specified feature type.

Examples
worksheet.Range["B2"].Value = "Used cell";
IRange range = worksheet.Range["A1:C5"];
IRange usedRange = range.GetUsedRange(UsedRangeType.Data);
string address = usedRange.Address;