GAS ⟩ Classes ⟩ Range ⟩ A1 notation ⟩ A1Notation()
replit, OneCompiler
⬆️ 需要: columnName()
equivalent to =ADDRESS() function of Google Sheets.
/** * convert (row, col) to A1 Notation (String) * * @param {number} row - row number of cell. * @param {number} col - column number of cell. * @returns {string} * * @example * * A1Notation(2, 4) // "D2" * A1Notation(3, 27) // "AA3" */ function A1Notation(row, col) { return `${columnName(col)}${row}` }
💈範例:
A1Notation(2, 4), // "D2" A1Notation(3, 27), // "AA3"
How to Convert Column Number (e.g. 28) to Column Letter (e.g. AB) in Google Sheets ⭐️ - row/column number ⇄ A1 notation
Remainder (%)
Math.floor()
A1NotationToRowColumn() - A1 notation to { row, col }.
{ row, col }
Last updated 2 years ago