【问题标题】:Python gdata Spreadsheet - save data to cell in SpreadsheetsListFeedPython gdata电子表格 - 将数据保存到SpreadsheetsListFeed中的单元格
【发布时间】:2014-04-10 05:27:51
【问题描述】:

我正在使用SpreadsheetsListFeed 从 Google 电子表格中读取数据。

工作表包含一个客户数据表,包括firstnamelastnameemailphone等. 列标题在工作表的顶行,数据在后面的行。我认为SpreadsheetsListFeed 是最好的选择,因为数据是表格格式。

但是,现在我需要使用 python 应用程序为每个客户生成一个 customerid,并将其写入电子表格(仅当它不存在于工作表中时)。我想知道是否有办法通过SpreadsheetsListFeed 执行此操作,或者我是否需要使用SpreadsheetCellsFeed 并根据现有的SpreadsheetsListFeed 计算行/列值。

python gdata 库的文档有点稀疏,因此我们将不胜感激。谢谢!

【问题讨论】:

  • 不确定你是否看过这个,但也许对你有帮助?它看起来是一个很好的例子:code.google.com/p/gdata-python-client/source/browse/samples/…
  • 谢谢 - 我应该在我的原始问题中包含该链接。还有这个:gdata-python-client.googlecode.com/hg/pydocs/… - 在UpdateRow 下写着:If you want to add additional information to a row, it is often easier to change the values in entry.custom, then use the Put method instead of UpdateRow. This UpdateRow method will replace the contents of the row with new_row_data - it will change all columns not just the columns specified in the new_row_data dict. - 但我不知道Put 方法是什么意思。

标签: python google-sheets gdata


【解决方案1】:

这就是我为电子表格 API 写一个小的wrapper lib 的原因。它使您可以像使用 dict 一样使用电子表格。

【讨论】:

  • 谢谢!我最终做了类似的事情:-)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-11-05
  • 2022-07-11
  • 1970-01-01
  • 2013-12-13
  • 2023-03-18
相关资源
最近更新 更多