GetRange

function GetRange(sRange: string = null): ApiRange

Description

Returns the ApiRange object by the range reference.

Parameters

sRangestringdefault: null

The range of cells from the current sheet.

Returns

ApiRange

Try It

var oWorksheet = Api.GetActiveSheet();
var oRange = Api.GetRange("A1:C1");
oRange.SetFillColor(Api.CreateColorFromRGB(255, 213, 191));
oWorksheet.GetRange("A3").SetValue("The color was set to the background of cells A1:C1.");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).