Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.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 每次创建新的Google工作表时添加新引用_Google Apps Script_Google Sheets - Fatal编程技术网

Google apps script 每次创建新的Google工作表时添加新引用

Google apps script 每次创建新的Google工作表时添加新引用,google-apps-script,google-sheets,Google Apps Script,Google Sheets,在Google电子表格中,有一个主表,其中包含对同一电子表格中学生表的单元格引用。每个学生表包含大量数据,但在主表中只需要引用10个数据单元 我可以很容易地在母版中设置对现有学生工作表的引用,但需要编写一个脚本,在每次创建新工作表时,母版工作表中的下一个空行将填充对新创建工作表的单元格引用 因此,母版中的几行可能包含以下公式: A B C ------------------ ---

在Google电子表格中,有一个主表,其中包含对同一电子表格中学生表的单元格引用。每个学生表包含大量数据,但在主表中只需要引用10个数据单元

我可以很容易地在母版中设置对现有学生工作表的引用,但需要编写一个脚本,在每次创建新工作表时,母版工作表中的下一个空行将填充对新创建工作表的单元格引用

因此,母版中的几行可能包含以下公式:

        A                       B                       C
------------------      ------------------      ------------------
=StudentSheet**01**!A1  =StudentSheet**01**!B1  =StudentSheet**01**!C1

=StudentSheet**02**!A1  =StudentSheet**02**!B1  =StudentSheet**02**!C1
由于我无法预先填充所有可能的学生工作表引用,因为它们还不存在,我想我需要一个脚本,它将向主控添加后续行,其中包括新工作表的名称和单元格引用

我可能还需要指定Master中的第一个空行,这可能需要计算一列中的数据计数,然后添加一个——除非它们是自动转到下一个空行的方法或函数

我尝试了一些进口范围的东西,但我需要的是推,而不是拉

任何让我开始的想法都会很好

谢谢