2 腿 oauth 和电子表格更新

发布于 2024-12-29 14:45:07 字数 424 浏览 3 评论 0原文

我正在使用 google api 更新一些电子表格(使用 2 条腿的 oauth,如所解释的 这里,除了我选中了两条腿访问控制框)。 创建电子表格工作正常,在电子表格内创建新工作表也工作正常。但我似乎无法与电子表格上的数据进行交互......

我得到:

使用 listFeed

很抱歉,发生了服务器错误。请稍等一下,然后尝试重新加载您的电子表格。

使用 CellFeed

com.google.gdata.util.AuthenticationException

有什么想法吗?

谢谢

I am using the google api to update some spreadsheets (using 2 legged oauth as explained here, except that I check the Two legged access control box ).
Creating the spreadsheets work fine, creating new worksheets inside a spreadsheet also works fine. But I can not seem to interact with the data on the spreadsheet....

I get either:

using listFeed

We're sorry, a server error occurred. Please wait a bit and try reloading your spreadsheet.

or

using CellFeed

com.google.gdata.util.AuthenticationException

Any ideas ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

醉南桥 2025-01-05 14:45:07

我在学习 Google 电子表格 API 时遇到了这两个错误。我希望谷歌能够更好地记录这些内容。

listFeed 方法的问题是我在 GDataSpreadsheetCustomElement 名称中使用了大写字母和空格。谷歌不喜欢这样。这是我在类似问题上发布的内容: 在电子表格(基于列表的提要)中添加行,但它不起作用

“如果您尝试插入的 GDataEntrySpreadsheetList 不包含与 创建GDataSpreadsheetCustomElement

时,用于“名称”的字符串必须与电子表格第一行中您感兴趣的列的值匹配,除非它必须全部转换为小写并已删除所有空格。”

使用 CellFeed 进行身份验证的问题是我使用了错误的 FeedURL。更新单元格时所需的 feedURL 是 [[worksheet cellsLink] URL];其中 worksheet 是您正在编辑的工作表的 GDataEntryWorksheet 对象。

I ran into both of these errors when learning the Google spreadsheets API. I wish Google did a better job documenting these.

My issue with the listFeed method was that I was using upper case letters and spaces in my GDataSpreadsheetCustomElement names. Google doesn't like this. Here is what I posted on a similar question: Add row in spreadsheet (List-based feed) but it not works

"This very misleading error can occur if the GDataEntrySpreadsheetList you're trying to insert contains no GDataSpreadsheetCustomElements that are relevant to the worksheet.

When creating a GDataSpreadsheetCustomElement, the string you use for "name" must match the value in the first row of the spreadsheet for the column you're interested in, EXCEPT that it must be converted to all lower-case and have all spaces removed."

My issue with authentication using CellFeed was that I was using the wrong FeedURL. The feedURL you want when updating cells is [[worksheet cellsLink] URL]; where worksheet is the GDataEntryWorksheet object for the worksheet you're editing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文