Skip to content

Instantly share code, notes, and snippets.

@edwardinubuntu
Last active July 19, 2017 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edwardinubuntu/da97995eca081050a33391e6898c3cd6 to your computer and use it in GitHub Desktop.
Save edwardinubuntu/da97995eca081050a33391e6898c3cd6 to your computer and use it in GitHub Desktop.
logging.debug('sheet_id: ' + str(sheet_id))
logging.debug('row.id: ' + str(eachUpdate['row.id']))
# Find the row by id
row_to_update = self.smart_sheet_authorized.Sheets.get_row(sheet_id, int(eachUpdate['row.id']))
# Check the update from GS is in SS Columns
if eachUpdate['column'] in column_map:
# Get the SS column id from columns map
smart_sheet_column = column_map[eachUpdate['column']]
# Get cell whict want to update
cell_to_update = row_to_update.get_column(smart_sheet_column)
# Update Value
cell_to_update.value = eachUpdate['value']
# Put column back to row
row_to_update.set_column(cell_to_update.column_id, cell_to_update)
# Update row
self.smart_sheet_authorized.Sheets.update_rows(sheet_id, [row_to_update])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment