跳到主要内容

GetCells

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

Syntax

expression.GetCells(row, col);

expression - A variable that represents a ApiWorksheet class.

Parameters

NameRequired/OptionalData typeDefaultDescription
rowRequirednumberThe row number or the cell number (if only row is defined).
colRequirednumberThe column number.

Returns

ApiRange | null

Example

This example shows how to get the ApiRange that represents all the cells on the worksheet.

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