【发布时间】:2016-01-23 22:27:44
【问题描述】:
我想在我的 HTML 网站中嵌入一个 google 表格,该表格将仅显示包含数据的单元格(无标题、行编号、以字母命名的列、边框等)并且它 可以被观看者过滤。查看者可以临时过滤数据,但不应更改原始过滤。
我有一个谷歌表,它有多个列,下面有标题和数据。我已经使用谷歌表格“过滤器”选项过滤了数据(包括标题)。 我知道如果我使用允许查看或编辑的共享链接,有一种方法可以嵌入可排序的谷歌工作表。但是当我使用那个编辑或查看链接时,我几乎不能使用任何url parameters。
示例编辑/查看链接:
https://docs.google.com/spreadsheets/d/{spreadsheet-key}/edit?usp=sharing目前最好的尝试是使用 url 参数 &rm=minimal,但它仍然显示其他工作表、编号的行和以字母命名的列
我可以在从 File -> Publish to the web -> Embed 获得的链接上使用 url 参数。这是链接:
< iframe frameborder="0" height="440" scrolling="no" src="https://docs.google.com/spreadsheets/d/{spreadsheet-key}/pubhtml?gid=0&single=true&range=A1:N20&widget=false&chrome=false&headers=false" style="float: left;" width="761"></iframe >
=>我在视觉上得到正是我想要的:一个干净的电子表格嵌入,只包含数据。但现在它无法过滤。
这是迄今为止最好的 iframe(可排序但不干净):
< iframe height="440" frameBorder="0" src="https://docs.google.com/spreadsheets/d/{spreadsheet-key}/edit?usp=sharing&rm=minimal" width="761"></iframe >
有没有办法只显示数据单元格并仍然允许排序?
【问题讨论】:
-
这是否更适合 Web 应用程序?
标签: html iframe google-sheets embed