Get Started
Usage API

GetUsedRange

GetUsedRange() → { ApiRange }

Returns a ApiRange that represents the used range on the specified worksheet.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiRange

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oUsedRange = oWorksheet.GetUsedRange();
oUsedRange.SetFillColor(Api.CreateColorFromRGB(255, 224, 204));
builder.SaveFile("xlsx", "GetUsedRange.xlsx");
builder.CloseFile();

Resulting document