You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
Hello, I wanted to ask if it's possible to (a)specify where to insert row in a spreadsheet instead of just appending at the end(b) specify the format of the cells. I basically want the new cells inserted to have the same format as the cell above them.
Is it possible to insert somewhere not at the end? And also to specify the formatting? Thanks :) Apologies is posting at a wrong place, will move it if necessary.
def InsertRow(self, row_data, key, wksht_id='default'):
"""Inserts a new row with the provided data
Args:
uri: string The post uri of the list feed
row_data: dict A dictionary of column header to row data
Returns:
The inserted row
"""
new_entry = gdata.spreadsheet.SpreadsheetsList()
for k, v in row_data.iteritems():
new_custom = gdata.spreadsheet.Custom()
new_custom.column = k
new_custom.text = v
new_entry.custom[new_custom.column] = new_custom
# Generate the post URL for the worksheet which will receive the new entry.
post_url = 'https://spreadsheets.google.com/feeds/list/%s/%s/private/full'%(
key, wksht_id)
return self.Post(new_entry, post_url,
converter=gdata.spreadsheet.SpreadsheetsListFromString)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello, I wanted to ask if it's possible to (a)specify where to insert row in a spreadsheet instead of just appending at the end(b) specify the format of the cells. I basically want the new cells inserted to have the same format as the cell above them.
I looked at the code here and it seems it uses the POST function here to insert a row:
https://github.com/google/gdata-python-client/blob/79d2d3c8a26662943fcbff11ec29732ad92bbf8b/src/gdata/service.py
Is it possible to insert somewhere not at the end? And also to specify the formatting? Thanks :) Apologies is posting at a wrong place, will move it if necessary.
The text was updated successfully, but these errors were encountered: