Converting Google Spreadsheet to HTML Table

不羁的心 提交于 2020-01-13 17:58:10

问题


I have a Google spreadsheet with data that will be updated on a weekly basis. I need to bring this data into a HTML table on my website.

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?


回答1:


You may be interested in GD API (description concerning spreadsheets).

Default download format is html. Write a script and run in using CRON once a day to pull newest version of you document.




回答2:


Open your spreadsheet, go to File > Download as > Web page (.html, current sheet)

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.



来源:https://stackoverflow.com/questions/11775476/converting-google-spreadsheet-to-html-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!