使用gdata-python-client ,如何向spreadsheet中插入和修改,删除数据:
网上资料很少,自己写了写老是报错,求大神指教
出错代码:(ps:就写了个插入,还差不进去,
)
import time
import gdata.spreadsheet.service
email = '1234567@gmail.com'
password = 'abcdefg'
weight = '180'
gd_client = gdata.spreadsheet.service.SpreadsheetsService()
gd_client.email = email
gd_client.password = password
gd_client.source = 'Example Spreadsheet Writing Application'
gd_client.ProgrammaticLogin()
dict = {}
dict['test1'] = time.strftime('%m/%d/%Y')
dict['test'] = time.strftime('%H:%M:%S')
dict['1'] = weight
print dict
entry = gd_client.InsertRow(dict,"triXrHT_0E0X0ZMpvFJYO-A","od6")
if isinstance(entry, gdata.spreadsheet.SpreadsheetsList):
print "Insert row succeeded."
else:
print "Insert row failed."