Go-Bruins
asked on
Google Sheets script efficiency
Hi all,
I'm just starting to learn the scripting language for Google Sheets. Here is some code that I'm experimenting with right now:
var nowSpread = SpreadsheetApp.getActiveSp readsheet( ); // assigns active SpreadSheet to var "nowSpread"
var nowSheet = nowSpread.getActiveSheet() ; // assigns active sheet to var "nowSheet"
var nowRange = nowSheet.getDataRange(); // assign active range to var "nowCell"
var nowCell = nowSheet.getActiveCell(); // assigns ActiveCell to var "activeCell"
var cellValue = nowCell.getValue(); // assigns cell value to var "cellValue"
*All* that code just to take the contents of the current cell and assign it to a variable.
Isn't there a simpler way? Thanks in advance.
I'm just starting to learn the scripting language for Google Sheets. Here is some code that I'm experimenting with right now:
var nowSpread = SpreadsheetApp.getActiveSp
var nowSheet = nowSpread.getActiveSheet()
var nowRange = nowSheet.getDataRange(); // assign active range to var "nowCell"
var nowCell = nowSheet.getActiveCell(); // assigns ActiveCell to var "activeCell"
var cellValue = nowCell.getValue(); // assigns cell value to var "cellValue"
*All* that code just to take the contents of the current cell and assign it to a variable.
Isn't there a simpler way? Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER