简体   繁体   English

从 Google 电子表格中获取数据

[英]Fetch data from Google Spreadsheet

how can I fetch data from a google spreadsheet?如何从谷歌电子表格中获取数据? It's not something like embedding a google doc on a webpage.这不像在网页上嵌入谷歌文档。 Suppose, you have a table consisting of 10 rows and 10 columns at google doc.假设您在 google doc 中有一个由 10 行和 10 列组成的表格。 Now, you created a 10x10 table on a PHP webpage.现在,您在 PHP 网页上创建了一个 10x10 的表。 Now you will show the respective values of the cells from that google doc to your php page.现在,您将显示从该 google 文档到您的 php 页面的单元格的相应值。 It's just like fetching data from a MySQL database and showing them on your web page.这就像从 MySQL 数据库中获取数据并将它们显示在您的网页上。 But here instead of using a MySQL database, I want to use Google Doc and do the rest.但在这里,我不想使用 MySQL 数据库,而是想使用 Google Doc 并完成其余的工作。 But how can I do it?但是我该怎么做呢?

Thank you.谢谢你。

Google has a REST api for spreadsheets and native apis for many languages. Google 有一个用于电子表格的 REST api 和用于多种语言的本机 api。

https://developers.google.com/sheets/api https://developers.google.com/sheets/api

If your data is the typical table layout (rows of data with a header row) - then you might find this python library helpful:如果您的数据是典型的表格布局(带有标题行的数据行) - 那么您可能会发现这个 Python 库很有帮助:

http://sheetsync.readthedocs.org/en/latest/ http://sheetsync.readthedocs.org/en/latest/

Temboo provides an SDK library that makes it pretty easy to interact with Google Spreadsheets in multiple languages, including Java/Android, PHP, Ruby, Python, Node.js, and Objective C. There's also an online tool for experimenting with different Google Spreadsheet API calls. Temboo 提供了一个 SDK 库,可以很容易地与多种语言的 Google 电子表格交互,包括 Java/Android、PHP、Ruby、Python、Node.js 和 Objective C。还有一个在线工具用于试验不同的 Google 电子表格 API调用。 Take a look at https://www.temboo.com/library/Library/Google/Spreadsheets/看看https://www.temboo.com/library/Library/Google/Spreadsheets/

(Full disclosure: I work at Temboo) (完全披露:我在 Temboo 工作)

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

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