'get name name of cell from his range google script
I want to retrieve the name of a cell having his range. this is the range :
var rangeOfCell = sheet.getRange(100,5);
I want to know how to get his native(A1, AB6,..., ZZA9) name easily
Solution 1:[1]
In order to retrieve "name of cell" (A1Notation) from sheet.getRange(100,5)
, please use getA1Notation()
as follows.
Sample script:
var rangeOfCell = sheet.getRange(100,5).getA1Notation();
console.log(rangeOfCell)
- For example, if
sheet
is declared likevar sheet = SpreadsheetApp.getActiveSheet()
, this script returnsE100
.
Reference:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Tanaike |