【发布时间】:2014-04-10 05:27:51
【问题描述】:
我正在使用SpreadsheetsListFeed 从 Google 电子表格中读取数据。
工作表包含一个客户数据表,包括firstname、lastname、email、phone等. 列标题在工作表的顶行,数据在后面的行。我认为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