Google apps script 谷歌表单-使用单元格';脚本中偏移量的s值
在Google Sheets中,我正在编写一个使用偏移功能的宏脚本: e、 g。Google apps script 谷歌表单-使用单元格';脚本中偏移量的s值,google-apps-script,google-sheets,Google Apps Script,Google Sheets,在Google Sheets中,我正在编写一个使用偏移功能的宏脚本: e、 g。 spreadsheet.getRange('G2').offset(0,1).activate() 但是,我需要用特定单元格中显示的任何数字(在本例中是B29)来抵消它,而不是用静态列数来抵消它。如何在偏移函数中引用B29的值?尝试以下操作: const bvalue = spreadsheet.getRange('B29').getValue(); //get the value of B29 spreadsh
spreadsheet.getRange('G2').offset(0,1).activate()代码>
但是,我需要用特定单元格中显示的任何数字(在本例中是B29)来抵消它,而不是用静态列数来抵消它。如何在偏移函数中引用B29的值?尝试以下操作:
const bvalue = spreadsheet.getRange('B29').getValue(); //get the value of B29
spreadsheet.getRange('G2').offset(0,bvalue).activate(); //pass it to the offset function
始终假设电子表格
是您已经定义的