The following snipt should do the trick!!

have fun!


import gdata.spreadsheet
import gdata.spreadsheet.service


import sys


gd_client = gdata.spreadsheet.service.SpreadsheetsService()

gd_client.email = ''
gd_client.password = ''

gd_client.ProgrammaticLogin()

key = ''

wksht_id = 'od6'

#here we add the headers
headers = ["weight", "height"]

for i, header in enumerate(headers):
    entry = gd_client.UpdateCell(row=1, col=i+1, inputValue=header, 
key=key, wksht_id=wksht_id)
#if isinstance(entry, gdata.spreadsheet.SpreadsheetsCell):


#here we add the data from stdin "100   1.6" and so on
for line in sys.stdin:
    weight, height = line.strip().split("\t")

    input_dict = {'weight': weight, 'height': height}

    gd_client.InsertRow(input_dict, key)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to