简体   繁体   English

将Google电子表格转换为HTML表格

[英]Converting Google Spreadsheet to HTML Table

I have a Google spreadsheet with data that will be updated on a weekly basis. 我有一个Google电子表格,其中包含的数据将每周更新一次。 I need to bring this data into a HTML table on my website. 我需要将这些数据放入我网站上的HTML表格中。

Rather than running it through a CSV to HTML converter each time and having to update the HTML code each time, is there a way for me to use PHP or Javascript to look up the Google Spreadsheet URL and convert the data to HTML Table tags without me needing to alter the code each time? 而不是每次都通过CSV转换为HTML转换器并且每次都必须更新HTML代码,有没有办法让我使用PHP或Javascript来查找Google电子表格URL并将数据转换为HTML表格标签而不用我需要每次都改变代码?

You may be interested in GD API ( description concerning spreadsheets ). 您可能对GD API有关电子表格的描述 )感兴趣。

Default download format is html. 默认下载格式为html。 Write a script and run in using CRON once a day to pull newest version of you document. 编写一个脚本并每天使用CRON运行一次以获取最新版本的文档。

Open your spreadsheet, go to File > Download as > Web page (.html, current sheet) 打开电子表格,转到文件>下载为>网页(.html,当前表)

That should open a link in a new window. 那应该在新窗口中打开一个链接。 This should automatically update when you reload the page after the data has been edited. 在编辑数据后重新加载页面时,这应该会自动更新。 In jQuery, you can use the .load function to load the data into your page. 在jQuery中,您可以使用.load函数将数据加载到页面中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM