Get Started
Usage API
More information

GetCols

GetCols(nCol) → { ApiRange }

Returns a Range object that represents all the cells on the columns range.

Parameters:

Name Type Description
nCol number

The column number. *

Returns:

Type
ApiRange

Example

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

Resulting document