GAS ⟩ Classes ⟩ Range ⟩ A1 notation ⟩ A1Notation()
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"