Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 谷歌表单-使用单元格';脚本中偏移量的s值_Google Apps Script_Google Sheets - Fatal编程技术网

Google apps script 谷歌表单-使用单元格';脚本中偏移量的s值

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

在Google Sheets中,我正在编写一个使用偏移功能的宏脚本:

e、 g。
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
始终假设
电子表格
是您已经定义的