Is it possible to reference discrete ranges in google scripts? -
i have google script function gets me range google spreadsheet.
function getgrainweights() { var ss = spreadsheetapp.getactivespreadsheet(); return range = ss.getrangebyname("brew_grains"); }
this range processed function modifies , upadtes values in range.
"brew_grains" named range in spreadsheet replace discrete range such "b2,c3,d10" etc. possible, or there workaround? cheers
you have following ways range, in addition named range used getrangebyname(name).
you can find documentation.
update
a workaround want can like:
... var ss = spreadsheetapp.getactivespreadsheet().getsheets()[0]; var ranges = []; var range = ss.getrange('b2:c3'); ranges.push(range); range = ss.getrange('d10'); ranges.push(range); processingfunction(ranges); ...
you can pass array (ranges) other function processing.
Comments
Post a Comment