GetCol
Get the number of the column for the selected cell.
Parameters:
Name |
Type |
Description |
val |
string
|
The cell from the current sheet to return the column number for. |
Returns:
- Type
-
number
Example
Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("D9").GetCol();
oWorksheet.GetRange("A2").SetValue(oRange.toString());
builder.SaveFile("xlsx", "GetCol.xlsx");
builder.CloseFile();
Resulting document