GetCells

function GetCells(row: number = null, col: number = null): ApiRange | "null"

Description

Returns the ApiRange that represents all the cells on the worksheet (not just the cells that are currently in use).

Parameters

rownumberdefault: null

The row number or the cell number (if only row is defined).

colnumberdefault: null

The column number.

Returns

ApiRange | "null"

Try It

var oWorksheet = Api.GetActiveSheet();
var oCells = oWorksheet.GetCells();
oCells.SetFillColor(Api.CreateColorFromRGB(255, 213, 191));

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).