const startColumn = stringTonum(sheetList[sheetIndex].startColumn);
export const stringTonum = (a: string) => {
let str = a.toLowerCase().split("");
let num = 0;
let al = str.length;
let getCharNumber = function (charx: string) {
return charx.charCodeAt() - 96;
};
let numout = 0;
let charnum = 0;
for (let i = 0; i < al; i++) {
charnum = getCharNumber(str);
numout += charnum * Math.pow(26, al - i - 1);
}
return numout;
}; |