Skip to main content

Is there any prebuilt function where we can get the cell Address/reference value from the Google Sheet?

 

For Example: If we are using  “Excel Advanced package : Get Cell Address” function. The output of this call will be like A1,B1..etc(depending upon the Active cell/specific cell).

 

So, is there any similar Function with Google Sheets to retrieve in the same way? or how can we achieve this?

As far as I know, there's currently no A360 action that retrieves the cell address of the active cell in a google sheets workbook.

But as a workaround, you can determine the cell address using Go to Cell, Loops, and Try-Catch actions like so: 

This is the JavaScript used in the JavaScript: Open action:

function toString(value) {
var decimal = value;
var converted = ];
decimal++;
while (decimal > 0) {
decimal--;
converted.push(String.fromCharCode('A'.charCodeAt(0) + (decimal % 26)));
decimal = Math.floor(decimal / 26);
}
return converted.reverse().join('');
}

You can find the source code of the bot here: 

A360-Google_Sheets_Cell_Address.json - GitHub Gist

You can use this extension to import the source code to a task bot: 

Bot Assistant - Chrome Web Store (google.com)

 

The bot dynamically counts rows and columns in a Google Sheet using loops that navigate through cells. It moves left to count columns and up to count rows, incrementing counters until an error signals no more cells in that direction. After counting, it uses the counters to loop back to the original cell by moving right and down. Finally, it converts the column count into A1 notation (e.g., A, AA) using JavaScript and combines it with the row count to generate the A1 cell reference (e.g., B2).


Reply