Get Started
Usage API
More information

GetCols

GetCols(sRange) → { ApiRange }

Return an ApiRange that represents all the cells on the columns range.

Parameters:

Name Type Description
sRange string

Specify the columns range in the string format.

Returns:

Type
ApiRange

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oCols = oWorksheet.GetCols("A1:C1");
oCols.SetFillColor(Api.CreateColorFromRGB(255, 224, 204));
builder.SaveFile("xlsx", "GetCols.xlsx");
builder.CloseFile();

Resulting document