converts a cell reference into a position of a cell
ref | string | cell reference |
array | a position of a cell |
$$('ssheet').refToPos("Sheet1!A1"); // [1,1,1,1,"Sheet1"]
$$('ssheet').refToPos("Sheet1!A1:B2"); // [1,1,2,2,"Sheet1"]
$$('ssheet').refToPos("A1"); // [1,1,1,1,""]
In case you need to convert the column letter into the index and vice versa, you can do it in the following way:
var ssheet = webix.ui({
view:"spreadsheet",
toolbar:"full",
data:spreadsheet_data
});
const col = 28;
// the number to the letter
const colLetter = ssheet.posToRef(1, col).split("1")[0];
webix.message(colLetter);
// the letter to the number
webix.message(ssheet.refToPos(colLetter+1)[1]);