阅读 Google 文档电子表格
是否可以使用 PHP 从 Google Docs 电子表格中提取行?
在 SQL 中我会使用类似的内容:
SELECT * FROM table WHERE field = 'value' LIMIT 1
有办法做到这一点吗?我听说你应该使用“Zend”框架,但我也无法弄清楚。任何帮助将不胜感激
Is it possible to pull rows from a Google Docs spreadsheet using PHP?
In SQL I would use something like:
SELECT * FROM table WHERE field = 'value' LIMIT 1
Is there a way to do this? I've heard you are supposed to use a 'Zend' framework, but I haven't been able to figure that out either. Any help would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自 Zend_Gdata文档:
并设置
$spreadsheetService
对象:您需要下载完整的 Zend Framework 或独立的 Google 数据 库。
From the Zend_Gdata documentation:
And to setup the
$spreadsheetService
object:You'll need to download either the full Zend Framework, or the standalone Google Data library.
您要查找的是 Google Visualization API 查询语言
不需要 PHP 中间件即可使其工作。它已经内置到文档中。
这是简介教程帮助您入门。
它是一种类似 SQL 的语法,通过参数化 URI 发送查询来工作。它可以返回 JSON、CSV 或 HTML 表中的匹配数据。它仍然很新,并且有一些怪癖,因此请务必阅读我发布的第二个链接上的所有评论。
What you're looking for is the Google Visualization API Query Language
No need for PHP middleware to get it working. It's already built-in to docs.
Here's a brief introduction tutorial to help get you started.
It's a SQL-like syntax that works by sending the query through a parameterized URI. It can return the matching data in JSON, CSV, or a HTML Table. It's still really new and has a few quirks so be sure to read through all the comments on the second link I posted.