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 sheets Google工作表:共享时指定特定的活动选项卡_Google Sheets_Google Sheets Api - Fatal编程技术网

Google sheets Google工作表:共享时指定特定的活动选项卡

Google sheets Google工作表:共享时指定特定的活动选项卡,google-sheets,google-sheets-api,Google Sheets,Google Sheets Api,我有一个谷歌电子表格文档,它有大约5个表格标签。我需要共享此文档,以便它出现在5个不同的html页面上(每个选项卡一个)。我希望在加载页面时,每个html页面都启用不同的活动选项卡。这可能吗 例如,以下是显示图纸的主页面: 如果你看页面的右边,有4个链接,每个链接都标有“图表:”。我希望这些链接都指向同一个电子表格,但启用了不同的活动选项卡。答案:经过进一步研究,我发现您可以通过添加共享URL来指定选项卡ID,如下所示: #gid=1892247629 其中“gid”与从Google she

我有一个谷歌电子表格文档,它有大约5个表格标签。我需要共享此文档,以便它出现在5个不同的html页面上(每个选项卡一个)。我希望在加载页面时,每个html页面都启用不同的活动选项卡。这可能吗

例如,以下是显示图纸的主页面:


如果你看页面的右边,有4个链接,每个链接都标有“图表:”。我希望这些链接都指向同一个电子表格,但启用了不同的活动选项卡。

答案:经过进一步研究,我发现您可以通过添加共享URL来指定选项卡ID,如下所示:

#gid=1892247629
其中“gid”与从Google sheets界面切换电子表格上的活动选项卡时在浏览器的URL地址栏中显示的相同

因此,在更改之前,我的iframe代码是:

<iframe src="https://docs.google.com/spreadsheets/d/.../edit?usp=sharing&amp;rm=minimal"></iframe>

更改后,它变为(查看src属性的末尾):


答案:经过进一步研究,我发现您可以通过添加共享URL来指定选项卡ID,如下所示:

#gid=1892247629
其中“gid”与从Google sheets界面切换电子表格上的活动选项卡时在浏览器的URL地址栏中显示的相同

因此,在更改之前,我的iframe代码是:

<iframe src="https://docs.google.com/spreadsheets/d/.../edit?usp=sharing&amp;rm=minimal"></iframe>

更改后,它变为(查看src属性的末尾):