assets/js/function.js
/**
 * Returns index of column header value.
 *
 * @param {String} value The column header value.
 * @return {Number} index of column header value.
 */
Returns index of column header value.
@param {String} value The column header value.
@return {Number} index of column header value.
Returns index of column header value . @param { String } value The column header value . @return { Number } index of column header value .
function alphaToIndex(value) {
  value = value.toUpperCase();
  let index = value.charCodeAt(0) - 65;
  for (let i = 1; i < value.length; i++) {
    index += 26;
    index += value.charCodeAt(i) - 65;
  }
  return index;
}
function alphaToIndex ( value ) { value = value . toUpperCase ( ) ; let index = value . charCodeAt ( 0 ) - 65 ; for ( let i = 1 ; i < value . length ; i ++ ) { index += 26 ; index += value . charCodeAt ( i ) - 65 ; } return index ; }
Returns index of column header value.
Returns index of column header value .
// console.log("index ", index);