标签: google-docs-api

Google Apps 脚本(Google 文档)- 在评论添加或更改时触发?

我正在搜索Google Apps 脚本文档,但我没有找到如何在 Google 文档中添加或更改评论时触发触发器。在 ElementType 部分(https://developers.google.com/apps-script/reference/document/element-type)下,我可以看到属性 COMMENT_SECTION,但在属性的描述中也有交叉的CommentSection元素。这是否意味着 CommentSection 类不再存在?

triggers google-docs google-docs-api google-apps-script google-drive-api

1
推荐指数
1
解决办法
1212
查看次数

来自Google Docs API的数据Feed

我正在尝试使用Google Docs API将电子表格数据作为XML,最终获得JSON数据.我已将URL(http://spreadsheets.google.com/feeds/list/0Aizy-VIdLC0QdDNNRkpfVncxQzZRNG9fMVhueXVMenc/1/private/values)放入浏览器,即使未登录Google,我也会获取数据.

当我尝试使用jQuery Ajax时,我收到"找不到页面"错误.

$.get('http://spreadsheets.google.com/feeds/list/0Aizy-VIdLC0QdDNNRkpfVncxQzZRNG9fMVhueXVMenc/1/private/values', function(data) {
  console.log(data)
});
Run Code Online (Sandbox Code Playgroud)

我猜相同的源策略可能是Ajax错误的原因,所以我尝试使用PHP,但是我得到了错误.

echo file_get_contents("http://spreadsheets.google.com/feeds/list/0Aizy-VIdLC0QdDNNRkpfVncxQzZRNG9fMVhueXVMenc/1/private/values");
Run Code Online (Sandbox Code Playgroud)

我的目标是将Google Docs电子表格数据转换为JSON对象,以便在网页上使用.

我该如何解决这个错误?

javascript xml ajax google-docs-api

0
推荐指数
1
解决办法
1639
查看次数

创建新工作表并在 Google 文档中的电子表格之间移动工作表

我有两个要求:

1)我想以编程方式从当前电子表格中的现有工作表创建一个新工作表

2) 我想以编程方式将一张工作表从一个电子表格复制到另一个电子表格

帮助表示赞赏。

google-docs google-sheets google-docs-api google-sheets-api

0
推荐指数
1
解决办法
5921
查看次数

使用PHP从Google Docs保存XLS

我正在尝试使用PHP解析Google Docs中的XLS文件.当我手动下载文件然后将其上传到服务器时它工作正常,但是当我使用PHP将完全相同的XLS文件直接保存到服务器时,而不是获取XLS中的所有数据,响应是:

<b>DOM ELEMENT: </b>HTML<br /><b>ATTRIBUTE: </b>lang => en<br /><b>DOM ELEMENT: </b>HEAD<br /><b>DOM ELEMENT: </b>META<br /><b>ATTRIBUTE: </b>charset => utf-8<br /><b>DOM ELEMENT: </b>META<br /><b>ATTRIBUTE: </b>content => width=300, initial-scale=1<br /><b>ATTRIBUTE: </b>name => viewport<br /><b>DOM ELEMENT: </b>META<br /><b>ATTRIBUTE: </b>name => description<br /><b>ATTRIBUTE: </b>content => Create a new spreadsheet and edit with others at the same time -- from your computer, phone or tablet. Get stuff done with or without an internet connection. Use Sheets to edit Excel files. Free from Google.<br /><b>DOM ELEMENT: …
Run Code Online (Sandbox Code Playgroud)

php xls google-docs google-docs-api

0
推荐指数
1
解决办法
311
查看次数

使用Python写入谷歌电子表格

我想知道是否有办法使用Python写入谷歌电子表格.找到了python-gdata-client库,安装了所有依赖项.使用下面的代码,但它不起作用

import time
import gdata.spreadsheet.service

email = 'email@gmail.com'
password = 'pwd'
weight = '180'
# Find this value in the url with 'key=XXX' and copy XXX below
spreadsheet_key = 'pRoiw3us3wh1FyEip46wYtW'
# All spreadsheets have worksheets. I think worksheet #1 by default always
# has a value of 'od6'
worksheet_id = 'Sheet1'

spr_client = gdata.spreadsheet.service.SpreadsheetsService()
spr_client.email = email
spr_client.password = password
spr_client.source = 'Example Spreadsheet Writing Application'
spr_client.ProgrammaticLogin()

# Prepare the dictionary to write
dict = {}
dict['date'] = …
Run Code Online (Sandbox Code Playgroud)

python api google-docs google-docs-api python-2.7

0
推荐指数
1
解决办法
4148
查看次数