Reputation: 11
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
Upvotes: 0
Views: 1136
Reputation: 201398
In order to retrieve "name of cell" (A1Notation) from sheet.getRange(100,5)
, please use getA1Notation()
as follows.
var rangeOfCell = sheet.getRange(100,5).getA1Notation();
console.log(rangeOfCell)
sheet
is declared like var sheet = SpreadsheetApp.getActiveSheet()
, this script returns E100
.Upvotes: 2